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? š
I use this feature frequently. But I’ve never seen the removed objects in the Diff Report so far.
You are right, that was wishful thinking…and a copy paste from the Data Modeler post which I have not published yet. In compares with Data Modeler you will also see what has been deleted. Thank you for the comment!
– Heli