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 > Loading data from Oracle to DB2 table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-06-04, 12:23
pinecone pinecone is offline
Registered User
 
Join Date: Apr 2004
Posts: 58
Question Loading data from Oracle to DB2 table

I need to load data from Oracle tables into DB2 tables.
What are the procedures? Thanks in advance!
Reply With Quote
  #2 (permalink)  
Old 08-06-04, 14:53
J Petruk J Petruk is offline
Registered User
 
Join Date: Mar 2004
Location: Toronto, ON, Canada
Posts: 513
Take a look at the IMPORT/LOAD command, and try to export it into one of the formats listed.

I don't think Oracle supports IXF so one of the ascii formats should do it.
__________________
--
Jonathan Petruk
DB2 Database Consultant
Reply With Quote
  #3 (permalink)  
Old 08-07-04, 01:46
famudba famudba is offline
Registered User
 
Join Date: Jan 2004
Location: Tallahassee, FL, USA
Posts: 96
you can load data from Oracle to DB2 ,

get data in dec file by using SQL statement, if table has date , put date in Db2 format , to_char( date,'YYYY:MMD') function





example Otacle table is emp

that has following structure


id number
name varchar2(30)
sal number(7,2)

data is like
1 elr 1000
2 msr 2000
3 est 3000



spool emp.dat
select to_char(id)||chr(36)||chr(39)||name||chr(39)||to_c har(sal)
from emp
spool off

emp.dat , will look like below
1,"elr",1000
2,"msr",2000
3,"est",3000


use emp.dat , load into db2 by using column delimeter,char delimeter

load from emp.dat of del MODIFIED BY CHARDEL" COLDEL, replace into db2.emp


not sure ascci value of " , number

Let me know , if any questions


Thank You


Lekharaju Ennam
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