SQL Server Performance

automatic expiry of locks

Discussion in 'Non-Transact SQL Developer Performance Tuning' started by chalakanth, Sep 22, 2004.

  1. chalakanth New Member


    My company is developing a web app with SQL Server on the backend. Our team does not have a lot of experience with SQL Server, and I have a pretty basic question.

    We are implementing transactions, and are trying to figure out if locks held by orphaned transactions can be released without manual intervention.

    Is there a way to set a limit to the life of a lock? We want a lock to be released once the time limit is exceeded.

    Any help is greatly appreciated.


  2. satya Moderator

  3. sundeip New Member

    You can use it to solve ur purpose.

    --sets the lock time-out period to 1,800 milliseconds.


  4. chalakanth New Member

    Thanks for the replies. I'll look into the articles.

    I am not sure that LOCK_TIMEOUT will help. The documentation says that LOCK_TIMEOUT stops a process from waiting to acquire a lock indefinitely. Our problem is that a process already has a lock and holds it indefinitely. We want that process to release the lock after a certain time.

    thanks again.

Share This Page