Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Script for revoking
Hi,
I'm trying to figure out how to automate some of our privilege granting procedures by turning them into sql scripts .. for instance, I have a user in the database who owns a bunch of tables. If I want to set permissions on this users tables to a known state I have to run a scrip of the form ..
revoke all on tablefoo from otheruser;
...
for each table/user in the database ideally (just to be sure .. is this being excessively paranoid?). At the moment I build up a list of these revokes by doing selects from the data dictionaries, spooling the results to a file and editing the file into the above format.
What I'd like to is create a procedure or set of procedure which will automatically build up this list and optionally do the revoking. What I'm not clear on is how to mix commands like revoke with sql type commands .. is it even possible?
Thanks for any advice,
-stephen