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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying db2 table to Oracle database

Status
Not open for further replies.

PatelRam

Programmer
Aug 20, 2003
87
US
I have two databases Db2 and Oracle. I want to copy
a table from db2 database to Oracle database.
The table has approx.3.5 million rows.

Could you let me know how do i go about this as i am
new to db2.

Thanks
 
Hi,

there are many ways to do this:

You can user MS Access with linked tables, both DB2 and Oracle.

Other programs like : DBArtisan from Embacadero (there is a evaluation version of it)

SQLways can also handle this task.

so long farhy
 
Hi Patelram

You do not explain where you want to copy the table only one time and never again – or you want to it on regular basis.

You do not explain if only rows or also objects on table like indexes, triggers and constraints must be copied.

You can as SEM wrote “export rows to a flat file” – but I would use EXTERNAL TABLE function. You are using a 9i database.

A common method is described by Farhy with Access. But remember that Access may change objects type (or precision) between source and destination.


Regards
Allan
Icq: 346225948
 
Hi,
I know it is a bit late to answer your post.. But thought will post this... I know that in oracle you can database links that can refer to non-oracle databases. I am sure if that is possible, with the use of database link, copying the structure of the table and the data should not be a problem. Pls note that the database links that are created for non-oracle databases behave in the same way as a normal database link(oracle-oracle). so if creating the database link is a success, the following query will do the magic :
create table xxx_from_db2 as select * from db2_table_name@database_link;

Thanks,
DOUBLEH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top