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!

transferring data from one database to another database

Status
Not open for further replies.

lowbk

Technical User
Nov 26, 2001
162
SG
hi ppl, i am writing a java program to transfer some data from one oracle database to another oracle database.

i was thinking of using

INSERT INTO table1 SELECT * FROM table2

but table1 and table2 are on 2 different databases, so that will mean 2 database connections. but the preparedstatement is binded on only 1 database connection, thus the above sql will probably fail.

is there another alternative?
 
My recommendation: use Oracle tools to export/import data.

To do it with Java, you will need a PS for the select, gather the data and use another one for the insert.



Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top