Description
当一个不是 MY_TABLE 这个表的 Owner - NOT_OWNER_USER 试图 grant MY_TABLE 的权限时,报错:
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.
Caused By
NOT_OWNER_USER 不是 MY_TABLE 的 Owner,并且没有得到 Owner给它的可以向下grant 的权限(Owner 虽然没有给 NOT_OWNER_USER向下授权的权限,但是可能给了其 select或者 update的权限)。
Solution
1 GRANT SELECT ON "OWNER_SCHEMA"."MY_TABLE" TO "NOT_OWNER_USER" WITH GRANT OPTION;