Possibly the solution is the same as for Menu item to View/Update Snippets is missing in 220.127.116.11.356.1154. ,
You might try Tools > Features... > Clear Cache and restart SQL Developer. If that does not work, try...
1. Deleting system_cache under your system18.104.22.168.356.1154 user settings folder, or even
2. Deleting or renaming the entire system22.214.171.124.356.1154 folder
Then restart SQL Developer and skip migration of user settings.
make sure you have 2 connections going
I just downloaded the latest version of SQL Developer in order to use the Database Diff utility to create an ALTER script that will make the underlying DDL the same on each schema within the database.
Why would you want EVERY SCHEMA to have the same DDL? That makes no sense to me.
Using the 'diff' functionality is for use cases where you may have relatively minor differences.
Your DDL should be in a version control system. Then the solution to your 'problem' is trivial: just extract and execute the DDL.
The EASIEST way to replicate schema ddl is to export the ddl from that schema and then just import it to the other schemas. After all if you really want a duplicate then the current DDL for those other schemas isn't needed.
As it turns out, Jeff makes an excellent point. Until you have either newly created or imported at least two connections in the Connections navigator tree, the Tools menu displays the Database Copy... and Database Diff... options in a disabled (greyed out) state. No connection needs to be open / active, but two or more must exist.
sometimes it's better NOT to know
In my case, I have one database, two schemas - one for DEV and one for PRD. My need is to bring the DDL changes in my DEV environment to the PRD environment. I was hoping to be able to create an ALTER script by comparing the two environments using 'database diff'.
I have gotten as far as creating two 'models', from the two environments - but don't know how to proceed from there.
Since the two schemas reside in one database, I will never have two connections - so does that mean the database diff menu options will always be greyed out in my case?
just create a connection for each schema.
That helped... The menu options are no longer greyed out..
However, how do I align a schema with each connection (schema DEV with connection DEV)... so that the diff will look at two separate schemas?
I did not see a way to specify a schema in the connection profile; and did not see a way to specify objects for both schemas when 'specifying objects' during the build of the diff.
When selecting DEV as the source and PRD as the target; then when specifying DEV schema objects during the 'specifying objects' dialogs... the report shows all objects being equal (looking at itself?). If I select DEV as the source and PRD as the target; then when specifying PRD schema objects during the 'specifying objects' dialogs..., everything looks like 'new' objects'.
Let's take a step back and settle some Oracle database concepts/terminology...
Creating a user automatically creates a schema. A schema may or may not contain objects since the user either may choose not to create objects or not have the necessary privileges to create objects. A user may be granted access to objects in the schema of another user (or users). For a discussion of schema vs user...
and populating a schema for an existing user via CREATE SCHEMA (which, by the way, I have never personally used and probably does not need to exist)...
So, in your case, you would want to....
1. Create one connection for the user owning the DEV objects (assuming one user does indeed own all DEV objects)
2. Create another connection for the user owning the PRD objects (same assumption as with DEV)
3. Run Database Diff... on those two connections.
If DEV or PRD have been granted access to objects owned by additional users, then that would complicate the Diff.
I did not see a way to specify a schema in the connection profile;
In Oracle a schema is a user.
connect as DEV
connect as PROD or TEST or WHATEVER
you're in the same database, just two different schema/users
in the DIFF or COMPARE dialog, if you pick these two connections, they'll automatically compare/diff those schemas
you choose the schema by supply the connection for that user