Thursday, November 15, 2018

ORA-01720: grant option does not exist for SCHEMA.TABLE

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

You are getting ORA-01720: grant option does not exist for SCHEMA.SOME_TABLE while trying to execute CREATE OR REPLACE VIEW V_MY_VIEW because you added the new table SOME_TABLE residing on a different schema and you lack privileges on SOME_TABLE. The you go and ask for SELECT privilege on the table SOME_TABLE with GRANT OPTION.
After obtaining the privilege you retry the operation but you still get:

ORA-01720: grant option does not exist for SCHEMA.SOME_TABLE


This happens because since version 11g you cannot simply replace a view containing a newly added table even if you have the SELECT privilege WITH GRANT OPTION.

You need to DROP VIEW V_MY_VIEW first and then re-create it.

The error message is misleading to say the least, a more specific error should be raised instead in these situations.

See message translations for ORA-01720 and search additional resources.

No comments:

Post a Comment

I appreciate your comment however bear in mind that I might not have the time to reply soon.
Normally I do not reply to all comments but I am glad if you found something useful or if you learned something new, in that case I strongly encourage you to promote the article with the +1 google button.
Flavio