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 > Does My Table Contain LOBs ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-18-08, 05:03
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Does My Table Contain LOBs ?

Hi Guys,

I need to test the table being exported if it has LOBs.

eg.

db2 export to DBFinder.STAFF.del of del select * from DBFinder.STAFF

db2 export to DBFinder.IN_TRAY.del of del select * from DBFinder.IN_TRAY

The second statement fails because it contains LOBs.

So I need to know beforehand any table being exported does not contail LOBs.
and -- suggest me the statemennt to export LOBs table.

DB2 version 9.5


Thanks
DBFinder

Last edited by DBFinder; 09-18-08 at 05:06.
Reply With Quote
  #2 (permalink)  
Old 09-18-08, 07:51
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Have a look at the manual. It describes the LOBSINFILE option, which you have to use to tell the export command how to handle lobs.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #3 (permalink)  
Old 09-18-08, 09:06
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
That's for later on.

The concern is to find out if table contains any LOBs.
Reply With Quote
  #4 (permalink)  
Old 09-18-08, 10:53
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
You could simply specify the LOB options - or you query SYSCAT.COLUMNS to figure out whether LOBs exist or not.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #5 (permalink)  
Old 09-19-08, 10:51
HanbingL HanbingL is offline
Registered User
 
Join Date: Dec 2007
Posts: 15
Export Lobs on every table, even on tables w/o lobs. Tables with no LOBS will not generate a LOBS file.

Code:
EXPORT TO DBFinder.STAFF.DEL OF DEL LOBS TO LOBS/ LOBFILE STAFF modified by lobsinfile select * from DBFinder.STAFF

EXPORT TO DBFinder.IN_TRAY.DEL OF DEL LOBS TO LOBS/ LOBFILE IN_TRAY modified by lobsinfile select * from DBFinder.IN_TRAY
Reply With Quote
  #6 (permalink)  
Old 09-20-08, 09:50
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Thanks Guys,
I used syscat.columns to know about lobs.
BTW I used HarbingL's advice to write statements.

Thanks
DBFinder
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