Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Release Locks

Status
Not open for further replies.

rr27

MIS
Nov 18, 2005
69
US
I'm fairly new to SQL 2000. Is thier a way to setup SQL so it will release a lock on a table after a period of time? Basically setup a TTL on a table lock?
 
Nope. Locks are not released until the operation which caused the lock has completed.

You can setup select operations to use no locking by using the NOLOCK hint.

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Hi

This might be of some use, see BOL for more detailed info


@@LOCK_TIMEOUT
Returns the current lock time-out setting, in milliseconds, for the current session.

Syntax
@@LOCK_TIMEOUT

Return Types
integer

Remarks
SET LOCK_TIMEOUT allows an application to set the maximum time that a statement waits on a blocked resource. When a statement has waited longer than the LOCK_TIMEOUT setting, the blocked statement is automatically canceled, and an error message is returned to the application.

At the beginning of a connection, @@LOCK_TIMEOUT returns a value of -1.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top