SQL Server has run out of LOCKS. Re-run your command when there are fewer active users, or ask your System Administrator to reconfigure SQL Server with more LOCKS.
This error occurs when there are not enough system locks to complete the current command.
Either execute the command again, when activity on the server is low, or have the system administrator increase the number of locks by calling the sp_configure system stored procedure from the master database.
To view the current configuration:
sp_configure locks go
This will report 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 re-start 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:
UPDATE employees SET salary= salary * 1.05 WHERE employee_id between 1000 and 9999 go
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