Results 1 to 11 of 11

Thread: Lock Mode wait.

  1. #1
    Join Date
    Nov 2003
    Location
    Pune, India
    Posts
    22

    Unanswered: Lock Mode wait.

    Hi,
    In case i want a thread to wait, i need to specify the same
    using SET LOCK MODE TO WAIT <n>.

    but this preference is retained only for that particulat session/connection.

    Is there a way wherein i can specify the same as a global setting for my database itself?
    Regards,
    Amit.K.

  2. #2
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    780

    Re: Lock Mode wait.

    Originally posted by amit_kaps
    Hi,
    In case i want a thread to wait, i need to specify the same
    using SET LOCK MODE TO WAIT <n>.

    but this preference is retained only for that particulat session/connection.

    Is there a way wherein i can specify the same as a global setting for my database itself?
    Hi,

    The SET LOCK MODE TO WAIT <n> must by set in the aplication, by default is NOT WAIT.
    Now, if this is imposible, maybe set lock mode first calling one SPL and set into.

    Gustavo.

  3. #3
    Join Date
    Nov 2003
    Location
    Pune, India
    Posts
    22
    HI,
    I am trying to avoid an additional database call from the application to set the wait, each time i neet to fire a query.
    Regards,
    Amit.K.

  4. #4
    Join Date
    Nov 2003
    Location
    Pune, India
    Posts
    22
    Hi,
    An additional information -
    I am using Informix Dynamic Server Ver. 9.30 FC2
    Regards,
    Amit.K.

  5. #5
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    780
    Originally posted by amit_kaps
    Hi,
    An additional information -
    I am using Informix Dynamic Server Ver. 9.30 FC2
    Hi Amit,

    One question: The lock level of tables are page or row ?

    Gustavo.

  6. #6
    Join Date
    Apr 2003
    Location
    Phoenix, AZ
    Posts
    177
    The SET LOCK MODE lasts for the session. You don't need to call it for each query.
    Fred Prose

  7. #7
    Join Date
    Nov 2003
    Location
    Pune, India
    Posts
    22
    Hi Gustavo,
    The lock mode is Row.
    Regards,
    Amit.K.

  8. #8
    Join Date
    Nov 2003
    Location
    Pune, India
    Posts
    22
    Hi Fred,
    In my case the session are being managed by the Application server,
    and i wouldn't know if the session is a new one or an older one(On which i have already fired SET LOCK MODE TO WAIT n).
    Regards,
    Amit.K.

  9. #9
    Join Date
    Dec 2003
    Location
    Argentina
    Posts
    3

    Lock Mode Wait

    Hi,

    I need to know what is the current value for Lock Mode Wait setting.

    How can I do that ?

    thanks

  10. #10
    Join Date
    Nov 2003
    Location
    Pune, India
    Posts
    22
    hi dubeda,

    you can query the sysmaster database and check it out

    for the specific table - select tabname, locklevel from systables
    where tabname="<the table name>"
    Regards,
    Amit.K.

  11. #11
    Join Date
    Apr 2003
    Location
    Phoenix, AZ
    Posts
    177
    Each session on the app server would have had to have issued the connect sequence. we fire the "set lock mode to wait" immediately following the "connect".
    Fred Prose

Posting Permissions

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