TEMPORAL_LOGICAL_TRANSACTION_TIME

Contains the value that is assigned to the row-begin column of a system-period temporal table, or to the end column in a history table during an insert, update, or delete operation.

This global variable has the following characteristics:
  • It is updatable, with values maintained by the user or the system.
  • The type is TIMESTAMP(12) WITHOUT TIME ZONE.
  • The schema is SYSIBM.
  • The scope of this global variable is session.

Start of changeFL 505 This global variable value is ignored during updates to catalog history tables.End of change

The global variable can be set to the following:
NULL
Specifies that temporal logical transactions are not in use. This is the default value. Db2 ensures the uniqueness of the generated values for row-begin columns in system-period temporal tables, and end columns in history tables across transactions, assuming that temporal logical transactions have not been used. If multiple rows are inserted or updated in system-period temporal tables within a single SQL unit of work, the values for the row-begin columns are the same for all of the rows and are unique from the values that are generated for the columns by another transaction. If a conflicting unit of work is updating the same row in the system-period temporal table, and the row to be inserted into the associated history table would have an end timestamp value greater than the begin timestamp value, an error is returned. If the begin timestamp value and end timestamp value for the row in the history table are the same, a row is not inserted into the history table.
Non-null value
Specifies a timestamp value to start a new temporal logical transaction. It is recommended that the value be later in time than the existing value of the global variable.
While the SYSIBM.TEMPORAL_LOGICAL_TRANSACTION_TIME built-in global variable is set to a non-null value, the application controls the scope of temporal logical transactions. Db2 does not ensure the uniqueness of the generated values for row-begin columns in system-period temporal tables, and end columns in history tables across transactions.
When the TEMPORAL_LOGICAL_TRANSACTIONS global variable is set to 0, within a unit of work, a single assignment of a non-null value can be made to the global variable.
The variable must not be assigned a value in the body of a before trigger.
The variable must not be assigned a non-null value if values have been assigned to row-begin columns or transaction-start-ID columns within the same unit of work.
During the execution of a data change operation, the value of the TEMPORAL_LOGICAL_TRANSACTION_TIME built-in global variable is the value established at the beginning of the data change statement.