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 > to lock a table in informix

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-17-07, 13:19
prasan5984@gmail. prasan5984@gmail. is offline
Registered User
 
Join Date: Nov 2007
Posts: 2
to lock a table in informix

How to lock a table in informix?
to be more specific, how to deny even the select access for a table in informix...
i tried lock table command .... it doesnt work..
Reply With Quote
  #2 (permalink)  
Old 11-18-07, 05:26
stanislav.ondac stanislav.ondac is offline
Registered User
 
Join Date: Aug 2005
Posts: 140
Table locks do not preclude table access. An exclusive lock prevents other users from obtaining a lock, but it cannot prevent them from opening the table for write operations that wait for the exclusive lock to be released, or for Dirty Read operations on the table.

Suppose you have database without logging in which the default isolation level is
dirty read. And dirty read isolation level does not place any lock on the table during the select statement. So it has no problem even if there is an exclusive lock on the table. And dirty read is the only isolation level allowed for databases that do not have logging turned on.

So changing the database logging mode(with ontape or ondblog) will solve your problem.
Reply With Quote
  #3 (permalink)  
Old 11-19-07, 07:58
ceinma ceinma is offline
Registered User
 
Join Date: Apr 2007
Location: Jundiai / SP - Brasil
Posts: 311
if you really need block any select... only way is execute a revoke select on <table> from <user> ... (to all users)
This is not a nice solution... but works...
Or, do the inverse. by default keep the table without select permission and create a ROLE (create role / grant role) with select permission on the table, then, when you realy need execute a select just active the role : SET ROLE <xyz>

If you use IDS 11.10 , read about LBAC, this not do exactly the perferct solution for what you need, but you can make more adaptive to you needs....
__________________
________________________________________
César Inacio Martins
Jundiai / SP - Brasil
http://www.imartins.com.br/informix - em Português
http://www.imartins.com.br/informix - English (translated by Google).
________________________________________
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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