If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Revoke privileges from all tables

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-19-09, 10:26
Chrys777 Chrys777 is offline
Registered User
 
Join Date: Jun 2008
Posts: 8
Revoke privileges from all tables

I had this issue today and I found this useful script:

Code:
output to "revokepub.sql"
without headings
select "revoke all on ", -- Revoke all privileges
trim(tabname) , -- Table name from systables
"from public;"
from systables , systabauth
where systables.tabid = systabauth.tabid
and grantee = "public" -- Select table names where public has privileges
and grantor = USER -- Only revoke the ones you have privilege to revoke
and systables.tabid > 99 -- Don't revoke the system table privileges
link

This script creates another script (revokepub.sql) that revokes privileges from all tables in a database.

I will run revokepub.sql on a busy database and my question is if it will cause any performance issues or if it will fail because some tables will be locked.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On