Microsoft
Software
Hardware
Network
Question : Revoke access on all tables
I have some 2000 tables with different previlages granted on them can use one statment like below to revoke all of them
revoke all on
from
;
I will have to execute above statement for each table, instaed can i use something like ALL or anyother keywords.
Thanks,
rajeev
Answer : Revoke access on all tables
you cannot do it with ALL
but you can do it with one script:
here is the short one:
set termout off
set feedback off
set heading off
set trimspool on
set linesize 200
set pagesize 0
spool revoke_all.sql
select 'revoke all on ' || table_name|| ' from
;' from all_tables where owner not in ('SYS', 'SYSTEM');
spool off
@revoke_all.sql
save this in a file , say test.sql
and call this file in sqlplus
SQL> @test.sql
that will be it
Random Solutions
DHCP database corruption
How to reduce the size of .LDF file?????
How to redirect in IIS7 but preserve URL parameters
How to remove quotation marks from dsquery results
Using GUIDs as primary key in Mysql innodb and how it affects inner joins
Create Button Macro-- Move to End of Document
was 5.1.2 admin console not opening on Win 2000 Professional
how to delete existing printer, delete drivers and reinstall it
Exchange server 2007 / windows server 2003- domain authentication question
Timeout error - revisit.