Solved

Exporting files in a SQL table to a folder easily

Posted on 2013-06-27
1
239 Views
Last Modified: 2013-07-03
What is the easiest way to export files that include mostly images that are located in a SQL table into a folder on my computer?

I am looking for either a software tool that makes this easy or the SQL script I can use to do this.

I look forward to your assistance.

Thank you.
0
Comment
Question by:rporter45
1 Comment
 
LVL 8

Accepted Solution

by:
virtuadept earned 500 total points
ID: 39281429
You can use a BCP method, using xp_cmdshell from a stored procedure.

Be sure to read the comments, there are some good advice in there.

http://stackoverflow.com/questions/12204577/exporting-binary-file-data-images-from-sql-via-a-stored-procedure

Another example:

http://stackoverflow.com/questions/1673803/how-to-save-an-image-from-sql-server-to-a-file-using-sql

You can use FILESTREAM enable database, on the same server, then some SQL proc(s) to copy your binary data from existing table into the filestream database.

http://msdn.microsoft.com/en-us/library/cc645585.aspx

You could also write a pretty quick C# or VB .NET application to read the database and write out the binary data to a file.


http://stackoverflow.com/questions/3693011/save-binary-file-from-sql-server
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how the fundamental information of how to create a table.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now