User Guide
SAP AG November 2002
Phenomena
During processing of concurrent transactions [Page 152], unclarified situations, or
“phenomena” can arise. When you define the lock behavior [Page
113] in your database
system, you should take account on the ways of avoiding these phenomena.
The following phenomena can occur if the same data is accessed concurrently:
Dirty Read [Page
119]
119
•
Non-Repeatable Read [Page
]
•
Phantom [Page
119]
•
The lock mode if defined via the isolation level [Page
139] (Requesting and Releasing a Lock
[Page 115]). Depending on the isolation level you determine, you can prevent these
phenomena from occurring.
The following table provides an overview of which phenomena can occur in the individual
isolation levels:
Isolation Level 0 Isolation Level 1 Isolation Level 2 Isolation Level 3
Dirty Read + - - -
Non-Repeatable
Read
+ + - -
Phantom + + + -
Dirty Read
One of the that can occur during processing of concurrent
is the dirty read phenomenon.
phenomena [Page 119]
transactions [Page
152]
A row is modified in the course of a transaction T1, and a transaction T2 reads this row before
T1 has been concluded with the COMMIT statement. T1 then executes the ROLLBACK
statement, i.e. T2 has read a row that never actually existed.
Non-Repeatable Read
One of the phenomena [Page 119] that can occur during processing of concurrent
transactions [Page 152] is the non-repeatable read phenomenon.
A transaction T1 reads a row. A transaction T2 then modifies or deletes this row, concluding
with the COMMIT statement. If T1 subsequently reads the row again, it either receives the
modified row or a message indicating that the row no longer exists.
Phantom
One of the phenomena [Page 119] that can occur during processing of concurrent
152 is the phantom phenomenon.
transactions [Page
]
A transaction T1 executes an SQL statement S that reads a set M of rows that fulfill a search
condition [See SAP DB Library]. A transaction T2 then uses the INSERT statement or the
User Manual: SAP DB 119










