Professional Documents
Culture Documents
licensing .
BEGIN FOR r IN ( SELECT table_name x FROM dba_tables WHERE owner = 'SCOTT' UNION ALL SELECT view_name FROM dba_views WHERE owner = 'SCOTT' ) LOOP EXECUTE IMMEDIATE 'grant select on scott."' || r.x || '" to scott_reader_role'; END LOOP; END; If you 'grant debug' you should be able to see the source in ALL_SOURCE.