select b.owner || '.' || b.table_name obj,
b.privilege what_granted, b.grantable,a.username
from sys.DBA_users a, sys.dba_tab_privs b
where a.username = b.grantee
and a.username='SCOTT'
order by 1,2,3;
Select owner || '.' || table_name obj,
privilege what_granted, grantable, grantee
from sys.dba_tab_privs
where not exists(select 'x' from sys.dba_users
where username = grantee)
order by 1,2,3;
select b.privilege what_granted,b.admin_option, a.username
from sys.dba_users a, sys.dba_sys_privs b
where a.username = b.grantee
and username='SCOTT'
order by 1,2;
select b.granted_role ||decode(admin_option, 'YES',' (With Admin Option)',null) what_granted, a.username
from sys.dba_users a, sys.dba_role_privs b
where a.username = b.grantee
and username='SCOTT'
order by 1;
select a.username,
b.granted_role || decode(admin_option,'YES',' (With Admin Option)',null) what_granted
from sys.dba_users a, sys.dba_role_privs b
where a.username = b.grantee
and username='SCOTT'
UNION
select a.username,b.privilege || decode(admin_option,'YES',' (With Admin Option)', null)what_granted
from sys.dba_users a, sys.dba_sys_privs b
where a.username = b.grantee
and username='SCOTT'
UNION
select a.username,
b.table_name || ' - ' || b.privilege|| decode(grantable,'YES',' (With Grant Option)',null) what_granted
from sys.dba_users a, sys.dba_tab_privs b
where a.username = b.grantee
and username='SCOTT'
order by 1;
Select username, profile, default_tablespace,
temporary_tablespace, created
from sys.dba_users
where username='SCOTT'
order by username
/
|
|