Error 1204

Severity Level 19

Message Text

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.

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 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: