Toad World® Forums

Export BLOB to File


#1

Can you suggest how I can export files stored in BLOB field. For some files it’s spited into multiple column.

Attached a screenshot of the table structure.

I tried exporting using TOAD. But the file getting corrupted.

Followed These Steps to Extract Files From BLOB Data in Oracle Using Toad

  1. In Toad for Oracle, click on the menu Database > Schema Browser .
  2. Then in the Tables tab, find your table containing BLOB data and click on it to select.
  3. On the right side, click on the Data tab, and it will show you the existing data.
  4. Then do the right click on the data grid and choose Export Blobs option.
  5. A window will appear as shown in below example. Select the BLOB column from the Export this column drop-down list. Then specify the export location in the Export Path field. Then select the radio button Export to files named for the value in this column (if the file names stored in a column), else choose sequentially numbered files option. Specify the file extension if a field for file names does not exist in the table. Now click on the OK button to export all the files from BLOB to the specified location.


#2

That should work. Are you sure that the data in the table is good?

I just tested and it worked fine for me. Here is what I did:

Create table blob_test(col1 number, col2 blob);
Ran that in editor, then ran “edit blob_test”.
added a row, put a number in COL1, then double-clicked the blob column and added a PDF file.
committed
followed the steps you gave.
double-clicked the exported file. Adobe Acrobat reader opened it no problem. So did Chrome.


#3

What version of Toad are you on? This feature was renamed to from “Export Blobs” to “Single Column Export” some time ago…


#4

It’s not working if the file splitted into multiple rows. Refer my screenshot. It’s generation 1 file but can’t open the file.


#5

So you split the contents of one PDF file among multiple rows in your database? Or do you have one PDF that consists of multiple files (I didn’t know that you could do that)?

That feature in Toad was written to make a single file out of each blob row in your table. If you want to stitch them together, you’ll have to do that with some other process afterwards.