When you
create/process batch input sessions
or
perform a client import, export, copy, or delete
or
import/complete a language
the following message occurs:
Informix SQL error -134 "ISAM error: no more locks"
together with
Informix SQL error -240 (INF240) "Could not delete a row"
or
Informix SQL error -246 (INF246) "Could not do an indexed read to get the next row"
or
Informix SQL error -271 (INF271) "Could not insert new row into the table"
or
Informix SQL error -418 "NULL SQLDA descriptor or host variable list encountered"
or
Informix SQL error -603 (INF603) "Cannot close blob"
or
Informix SQL-Fehler -605 (INF605) "Cannot write blob"
in operations on any tables.
INF240 INF246 INF271 INF418 INF603 INF605 INF134 ISAM134
RSCLICOP RSCLIEXP RSLANGIM RSLANGCP R3TRLANZ
The number of database locks which can be held simultaneously in a database is limited. A lock request which exceeded this maximum value led to the termination of the relevant transaction.
Usually the DB transaction which terminated is also the one which requested the large number of locks. However, the termination of the DB transaction responsible generally causes a very lengthy rollback, during which the same symptoms can also occur in other transactions.
As soon as the rollback of the DB transaction responsible is complete, the DB locks held by it exclusively are freely available again. If the SAP transaction responsible is executed again, the same situation generally arises. This can be solved only by carrying out one of the following actions:
- 1. Increase the maximum number of DB locks in the DB server:
The maximum number of DB locks in the DB server is defined via the Informix Profile Parameter 'LOCKS'. You can change this as database administrator either by using 'onmonitor' or by editing the file '$INFORMIXDIR/etc/$ONCONFIG' directly.
In each case you must restart the database in order to activate this change.
Up to and including R/3 Version 2.1H/2.2B, that is up to Informix Version 6.00.UE1, the maximum number of DB locks was 256000.
From R/3 Version 2.1I/2.2C, that is from Informix Version 6.00.USAP1, this maximum value is 8000000, i.e. 8 million, and is thus many times greater.
The number of DB locks can thus in theory be raised to this maximum. However, because this causes a linear increase in the shared memory allocated at the database start (approx. 4.5 MB per 100000 locks), the greatest practicable value depends on the main memory available.
The first time an overflow occurs, try doubling the current value of 'LOCKS'. After successfully executing the critical transaction, you should reduce the value for 'LOCKS' again, in order that the lock table does not take up the main memory in the DB server unnecessarily.
- 2. Change the granularity of the DB locks:
The Informix database recognizes three granularities of DB locks:
- row lock (locks one table line),
- page lock (locks one data block) and
- table lock (locks a complete table).
- a) Locks at table level:
Setting a 'table lock' is only possible explicitly in the transaction via the DML instruction 'LOCK TABLE...' and can therefore only be used in particular cases, e.g. when deleting a client.
In this case the critical DB operation (generally DELETE) must be executed for the database individually using 'dbaccess', for example:
$ dbaccess
> begin work;
> lock table
No comments:
Post a Comment