script to list privilege belongs to table in oracle database
set lines 400
set pages 0
select coalesce (b.grantee,a.GRANTEE) GRANTEE, table_name, privilege
from dba_tab_privs a
left join dba_role_privs b on a.grantee = b.GRANTED_ROLE
where table_name in (select table_name from dba_tables where owner not in ('SYSTEM','SYS','TSMSYS','WMSYS','OUTLN','DBSNMP'));
set lines 400
set pages 0
select coalesce (b.grantee,a.GRANTEE) GRANTEE, table_name, privilege
from dba_tab_privs a
left join dba_role_privs b on a.grantee = b.GRANTED_ROLE
where table_name in (select table_name from dba_tables where owner not in ('SYSTEM','SYS','TSMSYS','WMSYS','OUTLN','DBSNMP'));
No comments:
Post a Comment