DISCONNECT statement with RD-node specification (Disconnect from distributed RD-node)

Function

The DISCONNECT statement with RD-node specification terminates the current transaction normally, sets a synchronization point, generates one unit of commitment, and then disconnects the UAP from the distributed RD-node.

Privileges

None.

Format

DISCONNECT {RD-node-name|:embedded-variable}

Operands

RD-node-name
Specifies the name of the RD-node from which the UAP is to be disconnected.
embedded-variable
Specifies an embedded variable that contains as its value the name of the RD-node from which the UAP is to be disconnected.
If the UAP is written in C, specify a fixed-length character string of up to 31 bytes, the final character of which is the null value. If the character string does not terminate with the null value, the character string occupying (area length - 1) is used as the RD-node name.
If the UAP is written in COBOL, specify a fixed-length character string of up to 30 bytes; this character string need not terminate with the null value.

Common rules

  1. An RD-node that is not connected cannot be specified as the distributed RD-node from which the UAP is to be disconnected.
  2. The existing RD-node cannot be specified as the RD-node from which the UAP is to be disconnected (the existing RD-node means the local RD-node specified in the single-server definition or front-end server definition).
  3. When a DISCONNECT statement with an RD-node specification is executed, the UAP is disconnected from the specified distributed RD-node after HiRDB has executed the COMMIT statement.
  4. If the UAP is disconnected from the RD-node while it is the distributed RD-node, the current RD-node is switched to the existing RD-node.
  5. If execution of the DISCONNECT statement with an RD-node specification terminates with an error, the current RD-node remains unchanged.
  6. When a DISCONNECT statement with an RD-node specification is executed, the open cursor is closed and locked resources are released from locking. However, the holdable cursor for the existing RD-node is not closed and locked resources are not released from locking. Also, resources locked by a LOCK TABLE statement with UNTIL DISCONNECT specified are not released from locking.

Note

  1. A DISCONNECT statement with an RD-node specification cannot be specified from an X/Open-compliant UAP executing under OLTP.

Example

Disconnect the UAP from the RD-node whose name is RDNODE10:

DISCONNECT RDNODE10