Query user granted roles : dba_role_privs « System Tables Views « Oracle PL / SQL






Query user granted roles

 

SQL>
SQL> 
SQL> COL grantee          FORMAT A8
SQL> COL granted_role     FORMAT A30
SQL> COL grantor          FORMAT A8
SQL> COL privilege        FORMAT A12
SQL> COL owner            FORMAT A4
SQL> COL table_name       FORMAT A30
SQL>
SQL> 
SQL> SELECT   grantee
  2  ,        granted_role
  3  FROM     dba_role_privs
  4  WHERE    grantee = 'PLSQL';

GRANTEE  GRANTED_ROLE
-------- ------------------------------
PLSQL    CTXAPP
PLSQL    CONNECT
PLSQL    RESOURCE

3 rows selected.

SQL>
SQL> -- Query resources.
SQL> SELECT   grantor
  2  ,        owner
  3  ,        table_name
  4  ,        grantee
  5  ,        privilege
  6  FROM     dba_tab_privs
  7  WHERE    grantee = 'PLSQL';

no rows selected

   
  








Related examples in the same category

1.Query DBA_ROLE_PRIVS, ROLE_TAB_PRIVS for Name of the object, Privilege granted,Was admin option granted
2.Query DBA_ROLE_PRIVS, ROLE_TAB_PRIVS for Recipient of the grant,Owner of the object
3.Query dba_role_privs table