Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Ensuring cross-configuration consistency with a two-phase commit

&pagelevel(3)&pagelevel

Whenever UDS-D terminates a distributed transaction, it always ensures that updates are either performed on the databases of all DB configurations involved or on none of the databases.

The application program terminates a transaction with a FINISH statement. This FINISH statement is automatically sent to all configurations in which subtransactions were opened.

In order to ensure that a distributed transaction that has updated at least one database of a remote DB configuration can be terminated consistently even in the event of an error, the process of terminating a transaction is split into two phases:

  • In the first phase, UDS-D ensures that the updated pages of each subtransaction are securely logged in the RLOG file of the respective configuration.

    The successful completion of the first phase guarantees that all subtransactions can be terminated uniformly, i.e. either with FINISH or with FINISH WITH CANCEL.

  • In second phase, UDS-D terminates all subtransactions with FINISH if the first phase was successful in all configurations. Alternatively, if the first phase was not successful in at least one configuration, all subtransactions are terminated with FINISH WITH CANCEL.

This method of approach is known as a “two-phase commit”.

If the logical connection is lost or a system failure occurs during the termination phase of a distributed transaction, UDS-D ensures that cross-configuration consistency, i.e. consistency between UDS/SQL and openUTM, is maintained (e.g. in the case of a session restart or within the framework of transaction monitoring; see section “Monitoring secondary subtransactions in the PTC state”).

The execution sequence of the two-phase commit depends on how a transaction is distributed:

Distribution via UDS-D

The two-phase commit is controlled by the distribution component in the user task. The primary subtransaction does not enter the PTC (prepared to commit) state. See also section “PTC state”.

Distribution via UDS-D and openUTM

The two-phase commit is controlled by openUTM. In this case, even the primary subtransaction enters the PTC state.