Error 1204

Severity Level 19
Message Text

SQL Server has run out of LOCKS. Rerun your statement when there are fewer active users, or ask the system administrator to reconfigure SQL Server with more LOCKS.

Explanation

This error occurs when there are not enough system locks to complete the current command.

Action

Either execute the command again, when activity on the server is low, or have the system administrator increase the number of locks by executing sp_configure from the master database.

To view the current configuration:

sp_configure locks

GO

  

This reports the minimum, maximum, current run, and configuration values. To increase the number of locks, run sp_configure again, specifying the number of locks to be configured. For example, to configure 10,000 locks:

sp_configure locks, 10000

GO

RECONFIGURE WITH OVERRIDE

GO

  

Stop and restart Microsoft® SQL Server™ so the changes can take effect. Locks are allocated at system startup.

If the number of locks cannot be increased at the current time, and the single action requires more locks than the server is currently configured for, you may be able to reduce the number of locks required for the operation. For example, try the following:

to several UPDATE statements:

UPDATE employees

SET salary = salary * 1.05

WHERE employee_id BETWEEN 1000 AND 4999

GO

UPDATE employees

SET salary = salary * 1.05

WHERE employee_id BETWEEN 5000 AND 9999

GO

  

See Also
bcp Utility Starting, Pausing, and Stopping SQL Server
BULK INSERT sp_configure
Errors 1000 - 1999 UPDATE
Setting Configuration Options  

 

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.