Mega Code Archive

 
Categories / Oracle PLSQL Tutorial / User Privilege
 

Checking Object Privileges Granted to a Role

You can check which object privileges have been granted to a role by querying role_tab_privs. SQL> desc role_tab_privs;  Name               Null?    Type  ROLE               NOT NULL VARCHAR2(30)  --User to whom the privilege was granted.                                            OWNER              NOT NULL VARCHAR2(30)  --User who owns the object.                                                          TABLE_NAME         NOT NULL VARCHAR2(30)  --Name of the object on which privilege was granted.                            COLUMN_NAME                 VARCHAR2(30)  --Name of the column (if applicable).                                          PRIVILEGE          NOT NULL VARCHAR2(40)  --Privilege on the object.                                                       GRANTABLE                   VARCHAR2(3)   --Whether the privilege was granted with the GRANT option. Equal to YES or NO.  SELECT * FROM role_tab_privs;