Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Easiest way to copy/move data to another database?

538746Oct 10 2006 — edited Oct 29 2006
Dear All,

I need to write a program to copy data (in multiple tables) from one database to another database within one oracle 10g database server. So tables primary key in two database will different because of there are existing data in the new database, but the two database have same database schema. The schedule is tight, so I need to find a easiest way to implement it. The allowed technic is all oracle related technic and java. I am new in oracle database.

I think that there are following two solution for this task:

Solution A:
1. Write a java program to read data list which need to copy, from a file.
2. the java program pass the data list to PL/SQL program in oracle database.
3. the PL/SQL program do the copy/move data task according to data list.

Solution B:
1. write a java program to read data list which need to copy, from a file.
2. the java program use jdbc to select all data one by one from source database.
3. the java program use jdbc to insert all data one by one to destination database.

Which solution is better/faster? Any better solution can easily do it?

Thanks,

Regards,
Hing Cheow Yong
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 26 2006
Added on Oct 10 2006
11 comments
5,111 views