March 13, 2014

views in 12c

Observed an interesting idiosyncracy in the creation of views in 12c (this is in a pluggable database, but not confirmed whether this is related or not). This database was upgraded from 11.2 without incident…until we came to replace one of the existing views.

SQL> create or replace 2 view EXISTING_VIEW_NAME 3 as select * from other_schema.account;ERROR at line 3:ORA-01720: grant option does not exist for 'OTHER_SCHEMA.ACCOUNT'*

Now that struck us as odd, because this was a script from our source code control repository, which had no previous entries about grants for the OTHER_SCHEMA.ACCOUNT table. So then I tried this: