Oracle SQL Developer is full of nice feature, damned by a overwhelming options pane, like the one I will describe to you right now.
I will show here a very fast way of comparing different database and auto-generate migration script.
- Reverse engineer the source database using Oracle Data Modeler
- Now select the right arrow shown below:
- Select the destination datasource (more here) when asked.
- The compare pane will enable you to compare the databases.
But the default options will also use schema name to detect different object, so you will not get what you want in every scenario.
In 50% of my daily job, schema are different, so you must select the options below to fix it:
Select “Options” and then “Compare options”. Then de-select “Use schema property” like suggested below:
- Push the “Sync new object”. Then push the “DLL Preview” button and inspect the generated database.
- Bonus: by default the tool will not include tables to drop. Inspect the two pane ad check the table you want to drop in the left pane.
- Refrain launching the script without proper testing. You are migrating your valuable data.