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 > the best way to revoke

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-24-06, 15:15
ahmedwaseem2000 ahmedwaseem2000 is offline
Registered User
 
Join Date: Jan 2005
Posts: 75
the best way to revoke

Hi ,

current scenario: i have few shell scripts that i use to load the data into informix db.before beggining of the data loads i, run one shell script that individually revokes all the connection from the users.

Revoke connect from user

However, sometimes, the user sessions are not stopped? and hence when the shell script tries to gain the exclusive access of the table it fails, leading to worst consequences. what is the best method to revoke the sessions and the permissions?

i thought of killing all the user sessions, but when i kill the user session then there will not be an error message at the user end( a third party tool is being used to retrieve the data) and finally user getting only the portion of the data and not the complete data? please could any one here help me getting this resolved
Reply With Quote
  #2 (permalink)  
Old 04-25-06, 02:53
nitin_math nitin_math is offline
Registered User
 
Join Date: Nov 2004
Posts: 143
Hello Waseem,

I am afraid there is no way other that killing the sessions or you can set lock mode to wait, so it the job will first revoke the permissions from all users, and then will wait to lock the table in exclusive mode till all the users who are already using the table, to close the session.

Bye

Nitin
Reply With Quote
  #3 (permalink)  
Old 04-25-06, 03:55
ahmedwaseem2000 ahmedwaseem2000 is offline
Registered User
 
Join Date: Jan 2005
Posts: 75
Quote:
Originally Posted by nitin_math
Hello Waseem,

I am afraid there is no way other that killing the sessions or you can set lock mode to wait, so it the job will first revoke the permissions from all users, and then will wait to lock the table in exclusive mode till all the users who are already using the table, to close the session.

Bye

Nitin
hey nithin remember?
Reply With Quote
  #4 (permalink)  
Old 04-25-06, 05:33
nitin_math nitin_math is offline
Registered User
 
Join Date: Nov 2004
Posts: 143
OF course Waseem bhai.

;-)
Reply With Quote
  #5 (permalink)  
Old 04-25-06, 16:26
jwain jwain is offline
Registered User
 
Join Date: Aug 2003
Location: Allentown pa
Posts: 41
Can you lock the table while you are loading? That will lock all users out

begin work;
lock table xxx in exclusive mode;
load from xxxx.txt insert into xxxx;
commit work;
__________________
Jeff Wain
Reply With Quote
  #6 (permalink)  
Old 04-26-06, 06:38
ahmedwaseem2000 ahmedwaseem2000 is offline
Registered User
 
Join Date: Jan 2005
Posts: 75
Quote:
Originally Posted by jwain
Can you lock the table while you are loading? That will lock all users out

begin work;
lock table xxx in exclusive mode;
load from xxxx.txt insert into xxxx;
commit work;
Jeff, when some one is accessing the table, then you wouldnt be able to set the lock on the table exclusively
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