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.

comp1

First select the Source Connection and the Target Connection and select the parameters the way you want.

comp2

Press Next (In Finnish that is Seuraava šŸ™‚ , see SQL Developer even speaks Finnish :-D) )

Select the database object to be compared and press Next:

comp3

You can specify objects:

comp4

Or select all by just pressing Next.

You can see what will be compared and what will not:

comp5

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:

comp6

And if you select the Script tab you can see the DDL script to make that change to your target database:

comp7

Do you think this is a feature you should be using? šŸ˜€

Advertisements