If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > db2 blob column export to pdf

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-10-11, 02:49
santosh.veerlapat santosh.veerlapat is offline
Registered User
 
Join Date: Aug 2011
Posts: 3
db2 blob column export to pdf

Hi

I am santosh, we have db2 database table which has blob data one of its columns. this table has around 55,000 rows .

what all we need is to extract blob from db2 and create pdf files out of it.
is there any tool provides this functionality.

Initially i though of using java , but later i realized it takes more time.

If anyone has any thoughts please share.

Thanks in advance
Santosh Kumar Veerlapati
Reply With Quote
  #2 (permalink)  
Old 08-10-11, 03:00
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
blob is binary
is the contence of this column a loaded pdf file ?
to export you can use export and modifyers : modified by lobsinfile..
EXPORT
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #3 (permalink)  
Old 08-10-11, 03:28
santosh.veerlapat santosh.veerlapat is offline
Registered User
 
Join Date: Aug 2011
Posts: 3
yes exactly

the pdf file is stored in db column as blob.

but how i can retrieve all of these rows and save into individual files into pdfs

thanks
santosh kumar veerlapati
Reply With Quote
  #4 (permalink)  
Old 08-10-11, 03:48
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
as indicated before : have a look at export and modifyers
EXPORT
the only restriction is : you can not define the file-extension (pdf) only the name
you will have to rename the files
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #5 (permalink)  
Old 08-10-11, 04:00
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Code:
export to <export file name> of del  lobs to <lobdir> modified by lobsinsepfiles select  select <pri key columns>,<blobcol> from <tablename>
this will export the pdf files to a path specified as lobdir.
the names as guy says will be <something>.001.lob, <something>.002.lob etc.
the pk to blob mapping can be found in <export file name>, using which you can rename the blob files to pdf

hth
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On