Go Back   Wiki NewForum | Latest Entertainment News > Career Forum & Tips > Tech Forum & Tutorial > Oracle Database, SQL, Application, Programming


Best way to compare two Databases


Reply
Views: 1140  
Thread Tools Rate Thread
  #1  
Old 05-26-2009, 03:01 PM
bholus7
Guest
 
Posts: n/a
Default Best way to compare two Databases

Best way to compare two Databases

What is the best way to compare two databases. Especially tables+columns, indexes+columns, constraints, views, stored procedures, triggers.

It is not about data.

It is not possible to make a network connection to the two databases, so a dblink is not a possible solution.
-------------------------
select table_name from s1.user_tables
minus
select table_name from s2.user_tables
&
vice versa
&&
for all the other objects in question write sql the like
or use dbms_metadata for both schemas and then use your favourite editor to compare the files will all that ddl included
or take an exp from both schemas

imp /

@sid file=your.dmp fromuser=s1 show=yes log=s1.log
imp /

@sid file=your.dmp fromuser=s2 show=yes log=s2.log
then compare the logs and retrieve the differences
-------------------------
Use OEM Change Management to take the diff between two databases. Of course you would need OMS if want to take snapshots, but for simple comparison - it's not neccessary

Reply With Quote
Reply

New topics in Oracle Database, SQL, Application, Programming





Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
WikiNewForum)