SELECT 'GRANT SELECT ON ' ||
RPAD(T.REFERENCED_OWNER || '.' || T.REFERENCED_NAME, 60, ' ') ||
' TO ' || T.OWNER||' ;'
FROM DBA_DEPENDENCIES T
WHERE WNER = 'schema_name'
AND NAME = proceudre_name
AND T.REFERENCED_TYPE IN ('TABLE', 'VIEW')
ORDER BY T.REFERENCED_NAME
RPAD(T.REFERENCED_OWNER || '.' || T.REFERENCED_NAME, 60, ' ') ||
' TO ' || T.OWNER||' ;'
FROM DBA_DEPENDENCIES T
WHERE WNER = 'schema_name'
AND NAME = proceudre_name
AND T.REFERENCED_TYPE IN ('TABLE', 'VIEW')
ORDER BY T.REFERENCED_NAME
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24558043/viewspace-677097/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/24558043/viewspace-677097/