Database Reference
In-Depth Information
Lock Concept
SAP manages locks by using lock objects in ABAP programs. Lock objects are defined for
the database objects in the data dictionary, and this creates two function modules. One is for
locking the database object while a SAP transaction is being executed, and the second one is
for unlocking a database object when the transaction is complete. Also, each SAP transac-
tion or LUW may have many database locks. Database locks are usually held for a much
shorter time compared to the application transaction locks. Transaction code SM12 is used
to monitor and manage application locks.
Lock Modes
The four types of lock modes are described in Table 14-4 .
T ABLE 14-4 Types of Lock Modes in SAP Systems
Lock Table Profile Parameters (Regular Install and HA Install)
The lock table is not a physical table in the database, but is in the main memory of the en-
queue server that records the current locks in the system. The size of the lock table is de-
pendent on the allocated size of the profile parameter enque/table_size in kilobytes. Please
note that in high-availability (HA) installations, the enqueue server is separated into a separ-
ate ASCS instance and, therefore, enque/table_size must be set directly in the ASCS profile
(Example: BD1_ASCS01_venus) at the operating system level. Increasing the parameter
value in either default or instance profile will not work.
Black and Blue Locks
SAP enqueue work processes and update work processes work closely. Blue locks in SM12
transaction code are locks carried over by the updates and will be released only when all the
corresponding updates have been completed successfully. Since this group of locks is tied to
updates and involves data integrity and consistency, these locks are also backed up at the
Search WWH ::




Custom Search