Solved

Schema Compare

Posted on 2013-05-29
5
243 Views
Last Modified: 2013-10-14
Hi

Looking for the best way to compare two oracle schemas on Oracle 11g.  The comparisons I wish to make could be from Object difference level to view and package script difference level and possibly data level.

Was thinking of using DBMS_COMPARISON though this looks to be a data level only.

If anyone has any scripts available that would be even better.

Thanks

Andrew
0
Comment
Question by:alines
5 Comments
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39205182
The only way I know is the Oracle Change Management Pack (additional license) which is referenced in the link below.

The link below seems to have a couple of decent scripts that people have created:
http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:941629680330
0
 
LVL 18

Expert Comment

by:sventhan
ID: 39205702
If you have Toad, you could use that for a comparision.
0
 

Author Comment

by:alines
ID: 39205914
Thanks for the suggestions though the end result will be part of an automated test build
0
 
LVL 34

Accepted Solution

by:
johnsone earned 500 total points
ID: 39208579
There is a brute force method.  You can dump the contents of the relevant DBA views (such as DBA_TABLES, DBA_TAB_COLUMNS, DBA_CONSTRAINTS, DBA_CONS_COLUMNS, etc..) into separate files for the 2 sources.  Make sure a relevant where clause and order by is on your queries, then do a diff between the 2 files.

Not a pretty solution, but once you build it, it should work.

Alternately, you could do the whole thing in PL/SQL with database links between the 2 systems and check them that way.  I don't recommend that as the link would have to be through a privileged user, or the link would only connect to the current user and select from the USER views rather than the DBA views, which still may be a security concern, but less of one.
0
 
LVL 5

Expert Comment

by:Sanjeev Labh
ID: 39210440
For Schema comparison a number of tools are handy such as SQL Developer, Toad, PLSQL Developer. You can easily use these to compare which is quite accurate.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now