Number of Locks

All processes in SAP ASE share a pool of lock structures.

As an initial estimate for configuring the number of locks, multiply the number of concurrent user connections you expect, plus the number of worker processes that you have configured, by 20.

The number of locks required by queries can vary widely. See System Administration Guide: Volume 1 > Setting Configuration Parameters.

SAP ASE issues error message 1204 if it runs out of locks, and only the “sa,” or users with the sa_role, can log in to the server to configure additional locks. At this point, SAP ASE refuses login attempts by any other users and prints this message to the error log:
login: Process with spid <process id> could not connect to the ASE which has temporarily run out of locks
While in this state, SAP ASE refuses login attempts from users for whom the sa_role is not automatically activated during login. Automatic role activation occurs if the system security office has taken any of these steps:

Once logged in, the “sa” user, or the user with the sa_role, should immediately execute sp_configure to add locks. In this state, executing any other statement may cause SAP ASE to issue error message 1024 again.

SAP ASE may move to an unrecoverable state if a high number of “sa” users, or users with the sa_role, attempt to log in simultaneously when SAP ASE is out of locks.