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 > Export the database in csv format

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-02-06, 16:07
anksagr anksagr is offline
Registered User
 
Join Date: Jul 2005
Posts: 102
Export the database in csv format

Hi Everybody

I am trying to do an export of three databases in csv and ixf format...
I know I can use db2move for the ixf format but I am not sure if I can use db2move for csv. Using Export command would be very tedious because there are lot of tables in these databases. Any suggestions as to how can I do this export?

DB2 UDB v8.2, AIX

Thanks in advance!!
Reply With Quote
  #2 (permalink)  
Old 05-03-06, 07:15
ggnanaraj ggnanaraj is offline
Registered User
 
Join Date: Aug 2002
Location: Chennai, India
Posts: 171
Generate a script to do the export using 'export command'...

select 'export to '||lower(Tabname)||'.del of del select * from DB2INST1.'||upper(tabname)||';'from syscat.tables where tabschema='DB2INST1' and type = 'T' ;

HTH.
Reply With Quote
  #3 (permalink)  
Old 05-04-06, 10:13
anksagr anksagr is offline
Registered User
 
Join Date: Jul 2005
Posts: 102
Thanks for the query but some of the tables in these database have binary data will this query work for those columns also?

And as far as I know excel sheets have limitation of 65,553 rows in a spreadsheet, what if my table has more than 65,553 rows to be exported?

thanks again!!!
Reply With Quote
  #4 (permalink)  
Old 05-05-06, 00:31
ggnanaraj ggnanaraj is offline
Registered User
 
Join Date: Aug 2002
Location: Chennai, India
Posts: 171
For those 'some' tables with LOB/LONG data you can DEL format with LOBS TO ... LOBFILE ... syntax.
HTH.
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