Skip to content

Instantly share code, notes, and snippets.

@0x1b-xyz
Created February 27, 2014 15:17
Show Gist options
  • Save 0x1b-xyz/9252051 to your computer and use it in GitHub Desktop.
Save 0x1b-xyz/9252051 to your computer and use it in GitHub Desktop.
SELECT
'grant '||DECODE(object_type,'TABLE','select,insert,delete,update ','VIEW',
'select,insert,delete,update ','SEQUENCE','SELECT ','PROCEDURE','EXECUTE ','PACKAGE','EXECUTE '
,'TRIGGER','EXECUTE ','FUNCTION','EXECUTE ')|| ' on '||owner||'.'||object_name||
' to xpappusr;'
FROM
dba_objects
WHERE
OWNER='ODMT'
AND object_type IN ('TABLE',
'VIEW',
'PROCEDURE',
'FUNCTION');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment