Ekinlikler
31 Mar 23 - 2 Nis 23
En büyük SQL, Fabric ve Power BI öğrenme etkinliği. 31 Mart – 2 Nisan. 400 ABD doları tasarruf etmek için FABINSIDER kodunu kullanın.
Bugün kaydolunBu tarayıcı artık desteklenmiyor.
En son özelliklerden, güvenlik güncelleştirmelerinden ve teknik destekten faydalanmak için Microsoft Edge’e yükseltin.
Applies to:
SQL Server
Azure SQL Database
Azure SQL Managed Instance
Azure Synapse Analytics
Analytics Platform System (PDW)
Specifies the number of milliseconds a statement waits for a lock to be released.
Transact-SQL syntax conventions
SET LOCK_TIMEOUT timeout_period
timeout_period
Is the number of milliseconds that will pass before Microsoft SQL Server returns a locking error. A value of -1 (default) indicates no time-out period (that is, wait forever).
When a wait for a lock exceeds the time-out value, an error is returned. A value of 0 means to not wait at all and return a message as soon as a lock is encountered.
At the beginning of a connection, this setting has a value of -1. After it is changed, the new setting stays in effect for the remainder of the connection.
The setting of SET LOCK_TIMEOUT is set at execute or run time and not at parse time.
The READPAST locking hint provides an alternative to this SET option.
CREATE DATABASE, ALTER DATABASE, and DROP DATABASE statements do not honor the SET LOCK_TIMEOUT setting.
Requires membership in the public role.
The following example sets the lock time-out period to 1800
milliseconds.
SET LOCK_TIMEOUT 1800;
GO
The following example sets the lock timeout to wait forever and never expire. This is the default behavior that is already set at the beginning of each connection.
SET LOCK_TIMEOUT -1;
The following example sets the lock time-out period to 1800
milliseconds. In this release, Azure Synapse Analytics will parse the statement successfully, but will ignore the value 1800 and continue to use the default behavior.
SET LOCK_TIMEOUT 1800;
Ekinlikler
31 Mar 23 - 2 Nis 23
En büyük SQL, Fabric ve Power BI öğrenme etkinliği. 31 Mart – 2 Nisan. 400 ABD doları tasarruf etmek için FABINSIDER kodunu kullanın.
Bugün kaydolun