If you have eg. a table in which you have a column with binary data in which are stored images. and eg. a column with FileName.
And if you want to extract all images into a particular folder disk into separate files, then the easiest way is to create a SSIS package for that.
In the data flow task, put an OLE DB source and for reading the data from the table. Then put a Script component and select to use it as Destination. Connect the Source to that script component, select the input columns you want to use (the FileName and ImageData).
Then click the Edit Script button and provide a code for the script to store the data into a file on disk. Then in the editor complete the ProcessInputRow method like the one below
This assumes, that the FileName contains a completa path. If it contains only a filenames, then you can add a path to it.
And that's all. Once you run the packages, you will have all the images in separate files. if you do not have a file names, you can eg. create an incremental numbering etc. There are a lot of possibilities.
answered Mar 02, 2011 at 11:41 PM