现象:
ORA-01720: 授权选项对于'<schema>.<object_name>'不存在
ORA-01720: grant option does not exist for '<schema>.<object_name>'
ORA-01720: '<schema>.<object_name>'に対するGRANTオブションは存在しません
描述:
一般发生在A用户授权B用户可以访问自己的某一个对象,但是B用户中的某一个对象用到了A中的这个对象,B把自己的这个对象再授权给A时会发生这个错误。
例如,在A中有一个表test_table,且在A中使用grant select on test_table to B进行了授权,然后在B中新建一个视图test_view,在test_view中要用到A授权的test_table,现在,如果想要A去使用视图test_view,就需要执行grant select on test_viewe to A,但执行时就会出现ORA-01720的错误。
解决办法:
在A中使用grant select on test_table to B with grant option进行重新授权即可。
原因:未能掌握grant命令中with grant option参数的含义。