Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: Database Administration >> How to revoke all grants for user??

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: How to revoke all grants for user??
 shantanu  Posted: Mar 16, 2008 10:06:19 PM

 Total Post: 42
 Joined: May, 2007






 Hi Friends

I am trying to build a sql script which enables me to revoke all direct grants for a schema user on a database. Can anyone help me with the syntax of the script in order to revoke all grants??

Thanks in advance
Shanthan

 Gitesh
Posted: Mar 16, 2008 11:31:54 PM  

 Total Post: 322
 Joined: May, 2005






 
select 'revoke '||PRIVILEGE||' on '||table_name||' from '||grantee||';'
from dba_tab_privs where grantee='SCOTT';

select 'revoke '||PRIVILEGE||' from '||grantee||';'
from dba_sys_privs where grantee='SCOTT';

select 'revoke '||GRANTED_ROLE||' from '||grantee||';'
from dba_role_privs where grantee='SCOTT';

 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar814
  Mohammed Taj694
  Jayanta Sur479
  Vigyan Kaushik386
  positive fanatic361
  Gitesh Trivedi322
  Gopu Gopi239
  neeraj sharma228
  Ramesh Jois226
  snehalatha p169






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software