Easiest way to copy/move data to another database?
538746Oct 10 2006 — edited Oct 29 2006Dear 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