The SQL below will write the DDL to enable the schemas for editioning. You are probably not ready to execute these alter statements yet because here is what will happen:
- Most of the non-system objects in your database will become invalid – allow time to revalidate everything
- Some objects, with dependencies on the objects you just placed under EBR control, will fail to revalidate. If you did your homework with the prerequisite cleanups well, there won;t be many surprises here, but do allocate some time to deal with the unexpected.
- From now on, whenever you create a new user, you will need to be aware of their intended editioning status. The default is to not enable editions, likely because this can’t be undone, you can always enable editions on a user later, but you can disable editions. If you want to create a new user with editioning enabled, you must add the “ENABLE EDITIONS” clause to the create statement.
SELECT DISTINCT owner, editions_enabled, ‘alter user ‘ || username || ‘ enable editions force;’ cmd
FROM editioned_users_obj_cnt JOIN dba_users ON (username = owner) WHERE editions_enabled = ‘N’;
When you do feel ready to turn this on in any database, run the SQL and inspect it carefully (because it can’t be undone). You may want to do a backup and/or set a restore point, out of an abundance of caution.
After you execute the created DDL statements, re-run the SQL to see if they are all enabled. You should get no rows in the final run, except for any that you manually removed from the results the first time.
