ORACLE: Klonovanie privilegii uzivatelov medzi databazami

nieje zle mat na ociach tento skript:]

set lines 150;
set pages 200;
spool duplicate.sql
select 'grant '|| GRANTED_ROLE ||' to '||GRANTEE||';' from dba_role_privs where grantee='&grantee';
select 'grant '|| PRIVILEGE ||' to '||GRANTEE||';' from dba_sys_privs where grantee='&grantee';
select 'grant '|| PRIVILEGE ||' on '||OWNER||'.'||TABLE_NAME|| ' to ' ||GRANTEE|| ';' from dba_tab_privs where grantee='&grantee';
spool off

Leave a Reply