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.
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
Post a Comment