All processes in Adaptive Server 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 Chapter 5, “Setting Configuration Parameters,” in the System Administration Guide: Volume 1. For information about how worker processes use memory, see “Worker processes”.
Adaptive Server 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, Adaptive Server 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, Adaptive Server 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:
Granted the sa_role directly to the user
Granted the sa_role indirectly to the user through a user-defined role, which is specified as the user’s default role
Granted the sa_role to the user’s login profile, and altered the profile to automatically activate the sa_role
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 Adaptive Server to issue error message 1024 again.
Adaptive Server 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 Adaptive Server is out of locks.