Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

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, 14: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, 06:26
stanislav.ondac stanislav.ondac is offline
Registered User
 
Join Date: Aug 2005
Posts: 88
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, 08:58
ceinma ceinma is offline
Registered User
 
Join Date: Apr 2007
Location: Distrito Federal - Brasil
Posts: 197
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
Distrito Federal - Brasil
________________________________________
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

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