Database Administration (MOSC)

MOSC Banner

Revoke multiple object privileges from PUBLIC

edited Feb 13, 2013 1:20AM in Database Administration (MOSC) 4 commentsAnswered
Revoke multiple object privileges from

Hello,

in our company we have a oracle policy, in this policy there are defined that the role "PUBLIC" doesn' t hav any privileges.

But at my production and my test database PUBLIC have over 27000 object privileges.

Now i trying to revoke all these  object privileges at my test database.

I found a procedure in the web:

begin
      for cTab in (select * from SYS.dba_tab_privs where grantee ='PUBLIC') loop
          execute immediate 'revoke execute on '||cTab.owner||'.'||cTab.table_name || ' from ' || 'PUBLIC';
      end loop;
end;

But i get error message: ora-00903 invalid table name

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center