Podemos então utilizar o select abaixo para verificar os grants de sistema, objetos e roles concedidas.
**o Script irá gerar o comando DCL.
select * from (
select 'grant ' || privilege || decode(privilege,'READ',' on directory "','WRITE',' on directory "',' on "' || owner || '"."') ||
table_name || '" to "' || grantee || decode(grantable, 'YES', '" with grant option','"') || ';' as DCL from dba_tab_privs where
grantee in ('ANDERSON')
union all
select 'grant '||privilege||' to "'||grantee||'"'||decode(admin_option,'YES',' with admin option')||';' as DCL from dba_sys_privs where
grantee in ('ANDERSON')
union all
select 'grant "'||granted_role||'" to "'||grantee||'"'||decode(admin_option,'YES',' with admin option')||';' as DCL from dba_role_privs where
grantee in ('ANDERSON'));
DCL
-----------------------------------------------------------------------------------------
grant UNLIMITED TABLESPACE to "ANDERSON";
grant "RESOURCE" to "ANDERSON";
grant "CONNECT" to "ANDERSON";


0 comentários:
Postar um comentário