Solved

Schema Compare

Posted on 2013-05-29
5
247 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 77

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
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.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

839 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