Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2005
    Posts
    80

    Unanswered: 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

  2. #2
    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

  3. #3
    Join Date
    Jan 2005
    Posts
    80
    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?

  4. #4
    Join Date
    Nov 2004
    Posts
    143
    OF course Waseem bhai.

    ;-)

  5. #5
    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

  6. #6
    Join Date
    Jan 2005
    Posts
    80
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •