User guide

The standard thin server is a multi-threaded server that allows concurrent access to Oracle
Rdb by many client processes. Within a single OpenVMS process, Oracle Rdb is single-
threaded, thus the thin server has to synchronize client database activity.
Because database actions must be serialized, any action that might take a prolonged length of
time may seriously impact the overall throughput of the server.
By default the server will wait indefinitely for a lock, however, in order to try to minimize
the impact of one client thread on another you may specify the period of time the server
should wait for a lock.
If this wait is not indefinite, any thread will wait for the specified amount of time trying to
get a lock. If the lock is not granted control is returned to the server. By default, the server
will then try to get a lock ten (10) times, waiting for the specified amount of time each time,
before raising a locking exception.
Specifying a short wait duration, for example one (1) second, may help reduce the impact
that one thread may have on another sibling thread.
The lockwait switch allows control of the duration of the wait for a lock, the minimum actual
wait period being one (1) second, which is the minimum lock wait time supported by Rdb
transactions.
A lockwait of 0 is the same as starting up a transaction with NOWAIT. A lockwait of minus
one (-1) is the same as starting up a transaction with WAIT without specifying a value, which
causes the server to wait indefinitely,
The maxtries switch allows you to specify the maximum number of times the server will try
to get a lock before giving up. The default maxtries value is 10.
The higher the value you assign to the lockwait switch, the more likely that a locked object
may slow down all clients, so it is preferable to keep the lockwait at a minimum but increase
the number of lock attempts appropriately.
8.10.1 Lockwait precedence
As well as being able to specify the lockwait either at the server level or at the connection
level as shown above, Oracle Rdb allows you to specify a maximum lock wait for the
process by using the RDM$BIND_LOCK_TIMEOUT_INTERVAL logical name. In
addition a database-wide lock timeout value may be established using the LOCK TIMEOUT
INTERVAL clause of the SQL CREATE DATABASE and SQL ALTER DATABASE
statements.
The following describes the order of precedence observed when lockwait has been specified
in more than one way.
117