| title | Keep the Locks Configuration Option Default Value | |
|---|---|---|
| description | Keep the Locks Configuration Option Default Value. | |
| author | VanMSFT | |
| ms.author | vanto | |
| ms.date | 12/15/2023 | |
| ms.service | sql | |
| ms.subservice | security | |
| ms.topic | reference | |
| helpviewer_keywords |
|
[!INCLUDE SQL Server]
This rule checks the value of the locks configuration option. This option determines the maximum number of available locks. This limits how much memory the [!INCLUDE ssDEnoversion] uses for locks. The default setting of 0 enables the [!INCLUDE ssDE] to allocate and deallocate lock structures dynamically based on changing system requirements.
If locks are nonzero, batch jobs stop and an out of locks error message will be generated if the value specified is exceeded.
Use the sp_configure system stored procedure to change the value of locks to its default setting by using the following statement:
EXEC sp_configure 'locks', 0;
Configure the locks (server configuration option)
sys.dm_tran_locks (Transact-SQL)