Created
August 18, 2015 12:51
-
-
Save wkoszycki/e9e7e2bdf9c455f65ad5 to your computer and use it in GitHub Desktop.
Sql script to grant privileges to all tables of certain user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN | |
FOR R IN (SELECT owner, table_name FROM all_tables WHERE owner='<user>') LOOP | |
EXECUTE IMMEDIATE 'grant select,insert,update,delete on '||R.owner||'.'||R.table_name||' to <username>'; | |
END LOOP; | |
END; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment