tags:

views:

59

answers:

1

Are there any utilities available that allow you to bulk extract binary data from a SQL Server table?

For example, I have a number of Word documents stored in a table and I would like to extract all of these documents into files.

I know could do this by writing some .NET code, but I only need to do it once.

+2  A: 

Yes, You can use bcp utility:

http://msdn.microsoft.com/en-us/library/aa174646(SQL.80).aspx

And this simple stored procedure:

http://jahaines.blogspot.com/2009/10/exporting-binary-files-to-file-system.html

Rafal Ziolkowski
@klausbyskov See edit above
Rafal Ziolkowski
+1 Looks promising :-)
klausbyskov
Yep, unfortunately there is no simple one line solution until You use some third party tools or such way. I hope this helps :)
Rafal Ziolkowski
Thanks this did help, when I did a google search on BCP I came accross another utility, TextCopy.exe (part of the SQL 2000 tools) And knocked up a batch script to export the docuuments. But it looks like the link you provided would do the same thing. Thanks!
Sean Taylor