Home » RDBMS Server » Server Utilities » Merge two identical databases/schemas. (10g)
Merge two identical databases/schemas. [message #423640] Fri, 25 September 2009 16:57 Go to next message
wajidjafri
Messages: 6
Registered: September 2009
Junior Member
QUESTION
=========
We need to merge data between two databases. Database-A has 566GB of data. Database-B has 3GB of data. User/Table structures are same at both places. Database-A has no primary keys. How can we merge B into A so that we do not get duplicates?

Appreciate if someone can help us here. Thanks.

Wajid
Re: Merge two identical databases/schemas. [message #423645 is a reply to message #423640] Fri, 25 September 2009 18:00 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10671
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
With export and import, import will try to append the data (when using IGNORE=Y).
But it may not guarantee uniqueness as the target database has no primary key/unique key.
You might have to rely on SQL means.
Identify the column that could be used to check uniqueness.
Use MERGE across DBLINK.
There is some sought of restriction in USING clause with DBLINKS.
Just do not remember on top of my head.
Re: Merge two identical databases/schemas. [message #423963 is a reply to message #423640] Tue, 29 September 2009 08:18 Go to previous messageGo to next message
wajidjafri
Messages: 6
Registered: September 2009
Junior Member
Mahesh:

Thanks for your input. It will certainly help.

But I am looking a clean solution with 100% no-duplicate results.
Do you think we will have to write a procedure for each table to compare each row to resolve this problem?

Wajid
Re: Merge two identical databases/schemas. [message #423967 is a reply to message #423963] Tue, 29 September 2009 09:08 Go to previous message
Mahesh Rajendran
Messages: 10671
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
It is upto you.
Using a stored procedure or just plain sql.
Previous Topic: How to insert the data from data file into multiple tables using the delimited (like comma)
Next Topic: import .dmp file
Goto Forum:
  


Current Time: Sun Sep 25 02:40:14 CDT 2016

Total time taken to generate the page: 0.04698 seconds