Ansicht
Dokumentation

ABENLOCKING_CONFLICTS - LOCKING CONFLICTS

ABENLOCKING_CONFLICTS - LOCKING CONFLICTS

General Data in Customer Master   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.
SAP E-Book

Lock Conflicts in IBM DB2

On DB2 for i5/OS, locks are not only set for modifying transactions, but also for consistent reads on buffered tables, cluster tables, and pooled tables. The isolation level "read stability" is used for this purpose in the database system, using "shared locks", which prevent table contents from being modified simultaneously.

Besides timeouts and deadlocks, lock conflicts can also cause errors with DDL (data definition language) commands such as CREATE, ALTER, and DROP, and slow down online reorganization.

The statement OPEN CURSOR with the WITH HOLD option can be used to persist the position of a cursor beyond the commit event, if necessary.

To avoid lock conflicts, commits should be executed as database commits. The following function module can be used for this:

IF cl_db_sys=>dbsys_type = 'DB2'.
  CALL FUNCTION 'DB_COMMIT'.
ENDIF.

We recommend that these database commits are used in programs with extremely long read operations.






BAL_S_LOG - Application Log: Log header data   CPI1466 during Backup  
This documentation is copyright by SAP AG.

Length: 1830 Date: 20240424 Time: 174345     sap01-206 ( 29 ms )