Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

db2 export table(s)

Status
Not open for further replies.

RedHotRider

IS-IT--Management
Dec 10, 2001
7
US
I am fairly new to db2. I am reading through the IBM reference pages. I want to export a few log tables into a directory that needs to be backed up daily.


db2 export to /export/home/user/logtables of ixf select * from log_table_name

Any insight is appreciated.

[thumbsup2]
 
RHR,

not sure what your after. Does your command not work or are you after further info.

The export utility allows you to export data in into one of 3 supported file types: IXF,DEL or WSF. You can change many of the defaults by using the MODIFIED by parameter.

eg the default character deleimiter is the double quote. To change this specify the CHARDEL file type modifier. To use an * as the character delimiter use the following

EXPORT ...MODIFIED BY CHARDEL*.

If it's that the command isn't working for you then I would add the following

From your command of

db2 export to /export/home/user/logtables of ixf select * from log_table_name

it looks as though your output is attempting to go to a file called logtables, is this a file or a directory. Would it not be more appropriate to do the following

db2 export to /export/home/user/logtables/logback.ixf of ixf select * from log_table_name

Cheers
Greg


 
Greg,

Thanks for the help. I asked the question during the week to get examples/help before my maintenance window this weekend. Your example helped. I was receiving an I/O error because I didn't name a file. I was pointing to a directory.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top