Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2003
    Posts
    2

    Unanswered: ASE - how to obtain exclusive lock on select statement?

    Hello,

    Does anyone know how to obtain exclusive lock on data row on select statement? (table uses lock datarows locking scheme). I'm not interested in locking whole table or executing "artificial" update statement before select.

    Thanks in advance :-)
    Mirek Czajka

  2. #2
    Join Date
    Oct 2003
    Posts
    41
    Use the lowest level of locking required by each application. Use isolation level 2 or 3 only when necessary.
    Updates by other transactions may be delayed until a transaction using isolation level 3 releases any of its shared locks at the end of the transaction.
    Use isolation level 3 only when nonrepeatable reads or phantoms may interfere with your desired results.
    If only a few queries require level 3, use the holdlock keyword or at isolation serializing clause in those queries instead of using set transaction isolation level 3 for the entire transaction.
    If most queries in the transaction require level 3, use set transaction isolation level 3, but use noholdlock or at isolation read committed in the remaining queries that can execute at isolation level 1.
    ====================
    Rajesh

Posting Permissions

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