Error 1204
Severity
19
Error message text
SQL Server has run out of LOCKS. Re-run your command when there are fewer active users, or contact a user with System Administrator (SA) role to reconfigure SQL Server with more LOCKS.
Explanation
This error occurs when Adaptive Server runs out of locks . The number of locks available is controlled by the Adaptive Server configuration parameter number of locks.
Following is an example of the output from sp_configure, and a brief description of the output related to locks:
1> sp_configure "number of locks"
2> go
Parameter Name Default Memory Used Config Value Run Value
--------------------- ----------- ----------- ------------ -----------
number of locks 5000 0 5000 5000
The Default column contains the default value for number of locks, 5000.
The Memory Used column indicates the amount of memory used by the configured locks. Each lock requires 72 bytes of memory (11.5.x and earlier) or 120 bytes (11.9.x and later).
The Config Value column contains the value to which the number of locks configuration parameter has been set with sp_configure. If the value has not been explicitly configured, there is a 0 in this column and the default value is used.
The Run Value column contains the value Adaptive Server is using.
Action
Rerun the command when there are fewer active users, or ask the Sybase System Administrator ("sa") to reconfigure Adaptive Server for more locks. Increasing the number of available locks impacts performance and memory requirements.
Warning!
Before making any changes to Adaptive Server, refer to the Performance and Tuning Guide and "Configuring Memory" in the System Administration Guide for information about how Adaptive Server uses memory resources.
To increase the number of locks available, complete the following steps:
Determine the number of locks currently configured for Adaptive Server:
1> use master
2> go
1> sp_configure "number of locks"
2> go
Warning!
If you increase the number of locks available by too many locks, Adaptive Server may run out of memory and be unable to restart. Refer to Chapter 1, "Adaptive Server Does Not Start After Altering Configuration" if you run out of memory and cannot restart Adaptive Server.
Choose the number of locks you want to configure and issue the following command:
1> sp_configure "number of locks", new_value
2> go
Restart Adaptive Server to operate with the new values.