Newsgroups: comp.databases.oracle Subject: Re: Comparing two databases References:
BEERYR writes: >Any suggestions or third party tools that will compare objects in one >database to another database. This would include: tables, indexes, >triggers, stored procedures, database links, grants, synonyms, views, >constraints, sequences, and user definitions. Basically, anything >that makes one database different from another. >This would be used to compare development to production >or a customized db to the plain vanilla db. Or a pre-upgrade >db to a post-upgrade db. _____________Ari's Comments follow____________________________________________ Ron, There is an elegant way to compare objects in two databases. Create a database link from one to the other. Then you can type something like: SELECT TABLE_NAME FROM ALL_TABLES minus SELECT TABLE_NAME FROM ALL_TABLES@instance2; SELECT TABLE_NAME FROM ALL_TABLES@instance2 minus SELECT TABLE_NAME FROM ALL_TABLES; You will then get a list off all tables in one instance that is not in the other. You can also do this for sequences (ALL_SEQUENCES), procedures (ALL_SOURCE), etc. Best of luck to you, -Ari Kaplan Independent Oracle DBA Consultant <-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-> <-> Visit my Web Page: www.arikaplan.com <-> <-> email: email@example.com <-> <-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-> _________________Ron's Article Continues...___________________________________ >In my mind's eye, it would be nice if a before image could be stored. >Thus, take a before picture, developers do their stuff or run an >upgrade, take an after picture, then compare. Rather than needing >both db's running together. >Another idea would be take an export full=y rows=n of both db's >then have a unix script to compare them. But, optionally, ignre >differences due to extent sizing and such. >Any ideas. >Ron Beery >NCR >"Everything is computerized. What could possibly go wrong?"
Back to Ari Kaplan's Home Page
HREF="../index.htm">Back to Ari Kaplan's Home Page