onmode and Z arguments: Terminate a distributed transaction (SQL administration API)

Use the onmode and Z arguments with the admin() or task() function to terminate the specified distributed transaction. Use this function only if communication between the participating database servers has been lost. If applications are performing distributed transactions, terminating one of the distributed transactions can leave your client/server database system in an inconsistent state.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-EXECUTE FUNCTION--+-admin-+--(------------------------------->
                     '-task--'      

>--"onmode"--,--"Z"--,--"address"--)--;------------------------><

Element Description Key Considerations
address The shared-memory address associated with a distributed transaction. This must be the address of an ongoing distributed transaction that has exceeded the amount of time that the TXTIMEOUT configuration parameter specifies.

The address must conform to the operating-system-specific rules for addressing shared-memory. This address is available from onstat -x output.

Usage

This function succeeds only if the distributed transaction has exceeded the amount of time that the TXTIMEOUT configuration parameter specifies.

This function is equivalent to the onmode -Z command.

Example

The following example terminates a distributed transaction with an address of 0xa509018:
EXECUTE FUNCTION task("onmode","Z","0xa509018");

Copyright© 2019 HCL Technologies Limited