Annonymous Coward (me@home.com) writes:
I remember readng that BLOBs can be stored externally (with reference to
the BLOB file stored in tables instead).
Well, that you mean that you store the file name.
Does anyone have any experience doing this ? I have a few questions:
1).what are the things to watch out for (apart from obvious ones like
'file not found' type errors).
As Plamen said, SQL 2008 has FILESTREAM, but on SQL 2005, the big
problem is to get transactional consistency. And backups right.
2). How may a stored proc be written to fetch the BLOB data ? (An
example would be very helpful)
If the images are file, you don't fetch them from stored procedures,
but you read them directly from the file system.
On SQL 2008 with FILESTREAM, you can read the blobs from stored procedure,
but the more performant way is return a filehandle to the client
that can read the blob directly outside SQL Server.
3). How are errors handled in the stored proc that fetches the BLOB
data? (again an example would be very helpful)
What would be different here from reading a normal column?
--
Erland Sommarskog, SQL Server MVP,
es****@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx