SELECT 'grant ' || tt.granted_role || ' to ' || tt.grantee || ';' AS SQL_text FROM dba_role_privs tt WHERE tt.grantee = (UPPER('scott'))
UNION ALL
SELECT 'grant ' || tt. PRIVILEGE || ' to ' || tt.grantee || ';' FROM dba_sys_privs tt WHERE tt.grantee = (UPPER('
scott'))
UNION ALL
SELECT 'grant ' || tt. PRIVILEGE || ' on ' || OWNER || '.' || table_name || ' to ' || tt.grantee || ';' FROM dba_tab_privs tt WHERE tt.grantee = (UPPER('
scott'))
UNION ALL
SELECT 'alter user ' || tt.user_name || ' quota ' || maxblocks * BLOCKSIZE || ' on ' || ts_name || ';' FROM KU$_TSQUOTA_VIEW tt WHERE tt.user_name = (UPPER('
scott'));
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28572479/viewspace-2127045/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/28572479/viewspace-2127045/