Error 1204



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.


This error occurs when Adaptive Server runs out of locks. Beginning with Adaptive Server Enterprise version 12.5.2, 1204 errors are written to the error log with additional information, including the client IP address, user name and SQL text.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


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 chapter “Memory Use and Performance” in the Performance and Tuning: Basics and the chapter “Configuring Memory” in the System Administration Guide: Volume 2 for information about how Adaptive Server uses memory resources.

To increase the number of locks available, complete these steps:

  1. 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. If you run out of memory and cannot restart Adaptive Server, see the section “Adaptive Server does not start after altering configuration” in the most recent version of Troubleshooting and Disaster Recovery .

  2. Choose the number of locks you want to configure and issue this command:

    1> sp_configure "number of locks", <new_value>
    2> go

    Because the number of locks parameter is dynamic, you do not have to restart Adaptive Server to operate with the new values.

Additional information

Refer to the Performance and Tuning: Locking guide for information about locks and other Adaptive Server resources.

Refer to the section “number of locks” in the System Administration Guide: Volume 1.

Versions in which this error is raised

All versions