SELECT 'grant ' || PRIVILEGE || ' on ' || grantor || '.' || TABLE_NAME || ' to ' || GRANTEE || ';' FROM ALL_TAB_PRIVS WHERE (grantor LIKE '%EINP%' OR grantor LIKE '%SICP4%' OR grantor LIKE '%LOCAL%') and grantor not like 'SZ%' and GRANTOR not like 'JG%' and grantee not like 'PUBLIC';
select * from dba_tab_privs where (owner='JGB_GZJGSYYL' or grantee='JGB_GZJGSYYL')
SELECT 'grant ' || PRIVILEGE || ' on ' || grantor || '.' || TABLE_NAME || ' to ' || GRANTEE || ';'
FROM ALL_TAB_PRIVS
WHERE (grantor LIKE '%EINP%'
OR grantor LIKE '%SICP4%'
OR grantor LIKE '%LOCAL%')
and grantor not like 'SZ%'
and GRANTOR not like 'JG%'
and grantee not like 'PUBLIC';
select * from dba_tab_privs where ( grantee='JGB_GZJGSYYL');
select count(*) from dba_tab_privs where ( owner='JGB_GZJGSYYL')select 'grant ' || PRIVILEGE || ' on ' || grantor || '.' || TABLE_NAME || ' to ' || GRANTEE || ';' from dba_tab_privs where ( grantee='JGB_GZJGSYYL') union
select 'grant ' || PRIVILEGE || ' on ' || grantor || '.' || TABLE_NAME || ' to ' || GRANTEE || ';' from dba_tab_privs where ( owner='JGB_GZJGSYYL')SELECT 'grant ' || PRIVILEGE || ' on ' || grantor || '.' || TABLE_NAME || ' to ' || GRANTEE || ';'
FROM dba_TAB_PRIVS
WHERE (grantor LIKE '%EINP%'
OR grantor LIKE '%SICP4%'
OR grantor LIKE '%LOCAL%')
and grantor not like 'SZ%'
and GRANTOR not like 'JG%'
and grantee not like 'PUBLIC';SELECT 'grant ' || PRIVILEGE || ' on ' || grantor || '.' || TABLE_NAME || ' to ' || GRANTEE || ';'
FROM dba_TAB_PRIVS
WHERE (grantor LIKE '%EINP%'
OR grantor LIKE '%SICP4%'
OR grantor LIKE '%LOCAL%')
and grantor not like 'SZ%'
and GRANTOR not like 'DR%'
and grantee not like 'PUBLIC';SELECT 'grant ' || privilege || ' to ' || username || ';' FROM dba_sys_PRIVS a, all_users WHERE grantee = 'JG_EINP_TREATMENT' AND username LIKE 'JG%' AND (username LIKE '%LOCAL%' OR username LIKE '%SICP4%' OR username LIKE '%EINP%');