Background documentationExample: Consistent View Locate this document in the navigation structure

 

SAP liveCache databases use undo log entries to enable consistent views of the data. The following example shows how two transactions simultaneously can have consistent views of the same data record.

Note Note

Consistent views are only available for SAP liveCache databases. In SAP MaxDB databases, you configure transaction consistency using the isolation level.

More information: Isolation Level

End of the note.
  1. Transaction T1 accesses data record 3600 for the first time in table CUSTOMER and reads the value Smiht as the name. Transaction T1 does not lock the data record, however.

  2. Transaction T2 corrects the name Smiht to Smith in data record 3600. Transaction T2 is completed with a COMMIT.

  3. Transaction T1 accesses data record 3600 again and first checks in the history file whether a different transaction has changed data record 3600 since it was first read.

    As the data record was changed in the meantime by transaction T2, transaction T1 uses the undo log entries for transaction T2 to obtain the same result for the second read as for the first read. Without the undo-log entries, transaction T1 would get a different result each time it read data record 3600.

  4. The garbage collectors do not delete the undo log entries from transaction T2 until transaction T1 is ended with a COMMIT.

This graphic is explained in the accompanying text.

Example: Consistent View