授予同义词 select 权限

Grant select previleges to a synonym

--我正在使用名为 V_AREA 的视图,它是 SYNONYMAREA 但是,当我尝试向我的角色授予 select 权限时,出现以下错误:

GRANT SELECT ON AREA TO MY_ROLE

  • ERROR at line 1: ORA-02225: only EXECUTE and DEBUG privileges are valid for procedures

我没有使用程序,我该怎么办?

我已尝试使用以下赠款:

Grant select on area to my_role; --this one gives the above error
Grant select on 'area' to my_role; --this gives other error 
Grant select on "area" to my_role; --this gives the same error as 'area' 

编辑:

我创建了 2 个名为 AREA 的同义词:一个在我看来 V_AREA,另一个在 OGC_AREA 看来。不涉及手续

使用此

授予用户对视图中使用的所有基表的引用
Grant references on your_schema.tablename to target_schema or user;