SQL Developer Database Diff – Compare Objects From Multiple Schemas
- by thatjeffsmith
Ever wonder why Database Diff isn’t called Schema Diff? One reason is because SQL Developer allows you select objects from more than one schema in the ‘Source’ connection for the compare.
Simply use the ‘More’ dialog view and select as many tables from as many different schemas as you require
Now, before you get around to testing this – as you should never believe what I say, trust but verify – two things you need to know:
I’m using SQL Developer version 3.2
On the initial screen you need to use the ‘Maintain’ option
Maintain tells SQL Developer to use the schema designation in the source connection to find the same corresponding object in the destination schema.
Choose ‘maintain’ if you want to compare objects in the same schema in the destination but don’t have the user login for that schema.
So after you’ve selected your databases, your diff preferences, and your objects – you’re ready to perform the compare and review your results.
The DIFF Report
Notice the highlighted text, SQL Developer is ‘maintaining’ the Schema context from the two databases.
Short and sweet. That’s pretty much all there is to doing a compare with SQL Developer with multiple schemas involved.
You may have noticed in some posts lately that my editor screenshots had a ‘green screen’ look and feel to them.
What’s with the black background in your editors?
In the SQL Developer preferences, you can set your editor color schemes.
I started with the ‘Twilight’ scheme (team Jacob in case you’re wondering) and then customized it further by going with a default green font color. You could go pretty crazy in here, and I’m assuming 90% of you could care less and will just stick with the original. But for those of you who are particular about your IDE styling – go crazy!
SQL Developer Editor Display Preferences