See Using Adaptive Server Distributed Transaction Management Features for general information about configuring and administered DTM. This section describes configuration and administration issues that are specific to DTM on the clustered Adaptive Server.
When configuring the cluster for DTM, specify the cluster name as the RM. Make sure your applications use the cluster name in ASTC RPCs and in TM configuration.
The DTM-relevant configuration parameters (enable DTM, enable xact coordination, and strict dtm enforcement) are cluster-static in the clustered Adaptive Server. If you change the values of these parameters, you must restart the cluster for them to take effect.
The instanceid column in the syscoordinations and systransactions system tables identifies the owner instance of the transaction. An instanceid with a value of zero (0) indicates the owner instance has been shut down or has failed, and that the cluster coordinator is now the owner instance of the transaction.
Two functions support DTM on clustered Adaptive Server:
xact_owner_instance(XID) – returns the instance on which an external transaction is running.
xact_connmigrate_check(XID) – determines whether the current connection can process an external transaction.The XID parameter is optional.
If an external transaction name (XID) is specified:
Returns 1 if:
The connection is to the owner instance, or
The connection is to a nonowner instance, and the connection can migrate.
Otherwise, returns 0.
If an XID is not specified:
Returns 1 if the connection can migrate.
Otherwise, returns 0.
If a cluster instance is running a distributed transaction
branch, do not use the polite shutdown instance_name
command
to shut down the instance. Instead, use:
shutdown instance_name with nowait
The polite shutdown instance_name
command
can roll back regular user transactions running on an instance,
but it cannot roll back distributed transaction branches in the
prepared state. This means you can use the polite instance shutdown only
if there is no active distributed transaction on the instance.
When the instance is shut down using the nowait option, it triggers a failover recovery that reinstantiates the prepared distributed transaction branches of the instance on the cluster coordinator. See also “Handling instance failures”.
Although you cannot use the polite
shutdown instance_name
command,
you can use the polite shutdown cluster_name
command, even
if instances in the cluster have distributed transaction branches running
on them.