2010-11-24

User Enable Editions troubles and solutions

In Oracle 11g r2 the editions were the main new feature for database developers.

If a user has editions enabled some other user that has nor edition enabled cannot create a synonym to the first user (the one with editions enabled) objects.

You will need to enable also the editions for the second user.

alter user <user2> enable editions; (This clause is not reversible.)

If the schema contains any objects that are not editionable and that depend on editionable type objects in the schema, then you must specify FORCE to enable editions for this schema (otherwise you will get an ORA-38819: user USER2 owns one or more objects whose type is editionable and that have noneditioned dependent objects). In this case, all those objects will become invalid and you need to recompile them.

But be very careful, because you should not have table with object type columns where the object type is in that user (with enable editions)! That's because noneditioned objects like tables cannot depend on editioned objects like object types (you would get an "ORA-04063 table <:table_name> has errors" with those tables).
Solution: move the object types to an user with no "enable editions" set.

BTW (By the way) if you try to create a table depending in an edition object you would get an "ORA-38818 illegal reference to editioned object string.string"
The solution is the same as the above.

No comments:

Post a Comment

Os comentários são moderados.
The comments are moderated.