I am writing a serie of posts about different compares: comparing databases and comparing database designs. The possibility to automatically compare different versions of the database or a design is very crutial to have good quality designs and databases.
This first post is about comparing two databases. Maybe the production and the test?
If I want to compare two databases to each other, I use SQL Developer and the Database Diff functionality you can find under Tools menu.
First select the Source Connection and the Target Connection and select the parameters the way you want.
Press Next (In Finnish that is Seuraava 🙂 , see SQL Developer even speaks Finnish :-D) )
Select the database object to be compared and press Next:
You can specify objects:
Or select all by just pressing Next.
You can see what will be compared and what will not:
If you are happy with it just press OK, otherwice press Back and change your parameters.
In the Diff Report you can see in green all the new objects and in yellow all the objects that has been changes. If you select an object from the list you can see the exact change:
And if you select the Script tab you can see the DDL script to make that change to your target database:
Do you think this is a feature you should be using? 😀