How to find the assigned privileges to a user in oracle database

How to find the assigned privileges to a user in oracle database:

In order to find this, below queries will be helpful.

1)

select dbms_metadata.get_granted_ddl('ROLE_GRANT','&SCHEMA') from dual
union all
select dbms_metadata.get_granted_ddl('SYSTEM_GRANT','&&SCHEMA') from dual;

2)

select * from dba_role_privs connect by prior granted_role = grantee start with grantee = '&SCHEMA' order by 1,2,3; 
select * from dba_sys_privs  where grantee = '&&SCHEMA' or grantee in (select granted_role from dba_role_privs connect by prior granted_role = grantee start with grantee = '&&SCHEMA') order by 1,2,3;
select * from dba_tab_privs  where grantee = '&&SCHEMA' or grantee in (select granted_role from dba_role_privs connect by prior granted_role = grantee start with grantee = '&&SCHEMA') order by 1,2,3,4;

Thanks & Regards
Nikhil Kumar.
  

Comments

Popular posts from this blog

How to set the root password after creating instance on oracle cloud

TNS-12541 TNS-12560 TNS-00511 TNS:protocol adapter error No listener

Queryable inventory could not determine the current opatch status.