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 |
Send this thread to your friend |
|
|
|
|
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 Khokhar | 814 |
| Mohammed Taj | 694 |
| Jayanta Sur | 479 |
| Vigyan Kaushik | 386 |
| positive fanatic | 361 |
| Gitesh Trivedi | 322 |
| Gopu Gopi | 239 |
| neeraj sharma | 228 |
| Ramesh Jois | 226 |
| snehalatha p | 169 |
|
|