Check roles and privilegies for an user.



Check roles and privilegies for an user.


select 'Column' lvl,c.privilege,c.grantable,c.owner,c.table_name,c.column_name
from dba_col_privs c
where grantee in ('USER')
union
select 'Role' GrType,r.granted_role obj,r.admin_option a, null,null,null
from dba_role_privs r
where r.grantee in ('USER')
union
select 'Sys Priv',s.privilege,s.admin_option,null,null,null
from dba_sys_privs s
where s.grantee in ('USER')
union
select 'table',t.privilege,t.grantable,t.owner,t.table_name,null
from dba_tab_privs t
where t.grantee in ('USER')
and t.privilege !='EXECUTE'
union
select 'Program', e.privilege,e.grantable,e.owner,e.table_name,null
from dba_tab_privs e
where e.grantee in ('USER')
and e.privilege ='EXECUTE'
order by 1,2,4,5,6;


Comments