Version 7.5.1
 —  Adabas Transaction Manager Operations Guide  —

ATM Startup and Termination


Startup Processing

In a production environment, the various Adabas and Adabas Transaction Manager components should normally be started and allowed to initialize, one after the other, in the following order:

If the local Adabas System Coordinator daemon is not active when the ATM daemon starts, the ATM daemon will issue a warning message periodically, until the SYSCO daemon is found to be active. During this time, ATM will not be available for use by applications.

As each RM database starts, its local ATM daemon is notified, so that it can coordinate restart of any incomplete global transactions in which the RM database is involved.

Whether the ATM daemon initializes first or not, each incomplete transaction is finally committed or backed out at the earliest opportunity; that is, when all the necessary information is available to the ATM daemon at the root of the transaction and all the databases, ATM daemons, and any external coordinator involved in the transaction are available.

If for some reason a database running with ADARUN DTP=RM initializes before the ATM daemon, and the database has prepared transactions that have not completed, full use of that database is possible only when the ATM daemon has initialized and carried out restart processing for the incomplete transactions. Until this occurs, the resources of the incomplete transactions are held, and the owner of the transaction (that is, the owner’s ETID, if one was assigned) is not permitted to work on that database.

If the ATM daemon encounters a serious error while trying to resolve an incomplete transaction during restart, details are reported to the operator and to DDPRINT for up to 100 problematic transactions. Thereafter, errors are reported in the DDPRINT dataset only.

Top of page

Termination Processing

Closedown Procedure for a DTP=RM Database

The following procedure should be followed when closing down a database for which DTP=RM is in effect:

  1. Make sure that any ATM daemon to which the RM is signed on is active.

  2. Enter an ADAEND command for the RM database. If the database is currently taking part in global transactions, it will ask the appropriate ATM daemon(s) to quiesce these transactions.

  3. If the database issues an ATM073 message, an error occurred in communication with the ATM daemon indicated by the message, and the ADAEND process will not complete correctly. Check that the ATM daemon is active and retry the ADAEND. If it still fails, go to step 7.

  4. An ATM daemon will issue console messages indicating whether or not it was able to quiesce global transactions for this database. An ATM068 message is always issued. ATM069 and ATM071 messages indicate an error which is likely to prevent the ADAEND process from completing, and which probably requires manual intervention. ATM070, ATM072 and ATM078 messages all indicate pending completion for some global transactions, probably due to a temporary condition. Check the availability and status of external transaction coordinators, remote ATM daemons and Net-work connections. The ATM daemon will retry the operation at intervals of about a minute. If none of these messages follows the ATM068 message, the operation was successful. Once this status has been reached by all ATM daemons which were asked to quiesce transactions, the database will terminate as soon as all users reach ET status. An ATM126 console message will be issued by the ATM daemon(s) at this point.

  5. If the database does not terminate quickly, you might choose to issue an operator command to reduce its TT value. Before doing this, you should read and understand the following steps, and also the description of Heuristic Completion of Transactions.

  6. If the database still does not terminate quickly, monitor for the messages described in step 4 - these will re-appear approximately every minute, as long as the ATM deamon is unable to quiesce global transactions for the database.

  7. If operator intervention is possible, use Online Services to check for incomplete transactions on the database. (use function Transaction Manager Daemon Information > Display Known Databases, then use the line command L). If necessary you can force completion of a transaction using the Stop function.

    It might be necessary to use the Transfer to STJ option in the case of a transaction that is controlled by some other ATM daemon or an external coordinator.

    Caution:
    Use of the STJ option for this purpose may lead to an inconsistent result.

  8. If you need to close down the database immediately and leave it in a clean state, issue a HALT command.

    Caution:
    Use of the HALT command can cause heuristic completion of prepared transactions which can lead to inconsistent results.

  9. If you need to close down the database immediately, and it is acceptable to preserve incomplete transactions for completion during restart, do not use the HALT command; instead, use CANCEL - either the Adabas operator command or the operating system command.

    Caution:
    Do not delay this decision unnecessarily, otherwise the nucleus might heuristically complete prepared transactions whose TT limits have expired which could lead to inconsistent results.

Closedown Procedure for an ATM Daemon

The following procedure should be followed when closing down an ATM daemon:

  1. If you do not intend to restart the daemon immediately, you should first make sure that there are no global transactions active that have reached ‘prepared’ status on any local DTP=RM database. You can use Online Services (SYSATM) to display the global transaction queue to determine if there are active global transactions which have reached 'prepared' status. If so, it may be impossible to ADAEND a DTP=RM database while the daemon is not executing, without incurring heuristic termination of some transactions which could cause inconsistent results.

  2. Issue the TM END command to the ATM daemon.

  3. If the daemon is unable to terminate within about a minute, because of incomplete global transactions, it will issue an ATM103 message to the console, indicating that TM END is pending. You might then choose to issue TM HALT. The daemon should then terminate immediately, leaving any unresolved work for completion during restart.

    Note:
    This pending incomplete work will not prevent utilities from running against the ATM daemon’s database - the WORK dataset(s) will be clean.

    On normal termination, the ATM daemon writes runtime statistics to the DDPRINT dataset.

  4. Close down the local Adabas System Coordinator daemon, if desired.

Top of page