Oracle Database - ORA-01720 - grant option does not exist for 'AnObject'

> Database > Oracle Database

1 - About

This error occurs when a user want to GRANT a privilege on an object where it is not the owner (directly or through a view).

To be able to grant a privilege to a user on an object where you are not the owner, the owner must grant you the privileges with the “with grant option” statement.

3 - Example

GRANT SELECT ON "OWNER_SCHEMA"."MY_TABLE" TO "NOT_OWNER_USER" WITH GRANT OPTION;

Then the user “NOT_OWNER_USER” can grant the SELECT privilege to an other user.

GRANT SELECT ON "OWNER_SCHEMA"."MY_TABLE" TO "ANOTHER_NOT_OWNER_USER" WITH GRANT OPTION;

Otherwise, you will receive this error for instance, for a view:

Error report:
SQL Error: ORA-01720: grant option does not exist for 'OWNER_SCHEMA".MY_TABLE'
01720. 00000 -  "grant option does not exist for '%s.%s'"
*Cause:    A grant was being performed on a view and the grant option was
           not present for an underlying object.
*Action:   Obtain the grant option on all underlying objects of the view.
Advertising
db/oracle/ora-01720.txt · Last modified: 2017/09/06 19:28 by gerardnico