number of locks

Summary information

Default value

5000

Range of values

1000–2147483647

Status

Dynamic

Display level

Basic

Required role

System administrator

Configuration groups

Lock Manager, Memory Use

number of locks sets the total number of available locks for all users on Adaptive Server.

The total number of locks needed by Adaptive Server depends on the number of concurrent and parallel processes, and the types of actions performed by the transactions. To see how many locks are in use at a particular time, use sp_lock.

For serial operation, Sybase suggests that you start by assigning 20 locks for each active, concurrent connection.

Parallel execution requires more locks than serial execution. For example, if you find that queries use an average of five worker processes, try increasing by one-third the number of locks configured for serial operation.

If the system runs out of locks, Adaptive Server displays a server-level error message. If users report lock errors, you may need to increase number of locks; but remember that locks use memory. See Chapter 3, “Configuring Memory,” in the System Administration Guide Volume 2.

NoteDatarows locking may require that you change the value for number of locks. See the Performance and Tuning Series: Locking and Concurrency Control.