Solved

Schema Compare

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Array of Key/Value Pairs as input to Oracle function 10 53
export Oracle diagram from Oracle DB including VIEWS 8 105
Oracle Subquery bad Join 11 59
Oracle - SQL Parse String 5 20
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to recover a database from a user managed backup

895 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

13 Experts available now in Live!

Get 1:1 Help Now