Previous Topic: Incomplete Transactions and Manual RecoveryNext Topic: Manual Recovery


Deleting Resource Managers

When to Delete a Resource Manager

A resource manager should only be deleted if it no longer exists or if it is permanently inaccessible. Even in these cases, there is often no need to explicitly delete a resource manager, since it will disappear when the journal files are next formatted. However, if incomplete, distributed transactions exist that involve an inaccessible resource manager as a participant, then you may want to explicitly delete the resource manager to enable the transactions to be completed.

How to Delete Resource Managers

You can delete a resource manager by issuing a DCMT VARY DISTRIBUTED RESOURCE MANAGER command specifying DELETE. This removes the resource manager from the system, purges it from the journal files and deletes all associated transaction interests. Clearly, this command should be used with care.

The following procedure should be followed to delete a resource manager:

  1. Obtain a list of transactions in which the resource manager has an interest by issuing a DCMT DISPLAY DISTRIBUTED RESOURCE MANAGER command for the target resource manager.
  2. For each listed transaction determine whether the resource manager is a coordinator or a participant by displaying its detail using a DCMT DISPLAY DISTRIBUTED TRANSACTION command.
  3. Complete each transaction for which the resource manager is a coordinator by issuing one or more DCMT VARY DISTRIBUTED TRANSACTION commands.
  4. Issue a DCMT VARY RESOURCE MANAGER ... DELETE to delete the resource manager.
  5. Complete each transaction for which the resource manager was a participant by issuing a DCMT VARY DISTRIBUTED TRANSACTION command.

Note: For information about using DCMT commands to complete transactions, see 21.4.1, “Completing Distributed Transactions Using DCMT” Using DCMT.