Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: how to transfer data to Oracle 8.1.7?

Re: how to transfer data to Oracle 8.1.7?

From: Dmitry <support_at_ispirer.com>
Date: Thu, 26 Sep 2002 14:29:09 +0300
Message-ID: <amuqop$9b4i3$1@ID-75577.news.dfncis.de>


Hi,

You can use the DB2 EXPORT utility to export data to text files. You have to specify the DEL output format (delimited text file). For example:

db2 export to file.txt of del select * from table1

Then you need to create a control file to load data to Oracle using Oracle SQL Loader. For example:

OPTIONS(direct=false)
LOAD DATA
INFILE 'file.txt'
INTO TABLE table1
INSERT
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS (COL1, COL2, COL3) Then run Oracle SQL Loader:

sqlldr.exe userid=scott/tiger control=file.ctl log=file.log

If you need to migrate a lot of tables have a look at migration tool Chyfo (http://www.ispirer.com/products). It can export data from IBM DB2 and Oracle, generate DDL scripts, control files for Oracle SQL Loader and scripts for IBM DB2 IMPORT/LOAD utilities.

Best regards, Dmitry

"david chan" <davidchantf_at_hotmail.com> wrote in message news:dca7348f.0209240538.369c3b77_at_posting.google.com...
> Hi,
> What's the best way to transfer data from DB2 to Oracle 8.1.7? There
> are only four tables in DB2 with a few thousands records. Can DB2 do a
> dump data to text file then Oracle import the file?
>
> Thanks.
> David
Received on Thu Sep 26 2002 - 06:29:09 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US