on 2011 Aug 30 6:29 PM
How do i assign the same permissions for a group to all tables in database at the same time?
from what i have found looks like one by one, i am not going to do that for 408 tables. any ideas?
This is what I use for doing those kinds of things, but I also use SA10 so this may need to change a little bit for v8:
for tableFor as tableCursor dynamic scroll cursor for select st.table_name as @tableName from systab st where st.table_type = 1 order by st.table_name asc do execute immediate 'grant insert on ' || @tableName || ' to groupName'; end for;
Change the SELECT
query as needed to further define tables, and change the EXECUTE IMMEDIATE
to include the permissions you wish to grant and also the groupName at the end to your particular group name.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thank you very much kind sir. i used. the only real change needed is systab needs to be systable other than that it worked awesome.
for tableFor as tableCursor dynamic scroll cursor for select st.table_name as @tableName from systable st order by st.table_name asc do execute immediate 'grant update, select, insert on ' || @tableName || ' to TEST_NON_DBA'; end for;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.