?
Solved

Exporting files in a SQL table to a folder easily

Posted on 2013-06-27
1
Medium Priority
?
248 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 8

Accepted Solution

by:
virtuadept earned 2000 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

771 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