Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Schema Compare

Posted on 2013-05-29
5
Medium Priority
?
251 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 35

Accepted Solution

by:
johnsone earned 1500 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

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…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
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…

704 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