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:
The database which contains the Adabas System Coordinator’s
configuration file (regardless of its DTP
parameter
setting)
The Adabas System Coordinator daemon within which the ATM transaction manager runs as a service.
Databases that run with DTP=RM
As each RM database starts, its local ATM manager is notified, so that it can coordinate restart of any incomplete global transactions in which the RM database is involved.
Whether the ATM manager 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 manager at the root of the transaction and all the databases, ATM managers, 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 manager, and the database has
prepared transactions that have not completed, full use of that database is
possible only when the ATM manager 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 is not
permitted to work on that database.
If the ATM transaction manager 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.
The following procedure should be followed when closing down a database
for which DTP=RM
is in effect:
Make sure that any ATM transaction manager to which the RM is signed on is active.
Enter an ADAEND
command for the RM
database. If the database is currently taking part in global transactions, it
will ask the appropriate ATM manager(s) to quiesce these transactions.
If the database issues an ATM073 message, an error occurred in
communication with the ATM manager indicated by the message, and the
ADAEND
process will not complete correctly. Check
that the ATM manager is active and retry the ADAEND
.
If it still fails, go to step 7.
An ATM manager 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 managers and Net-work connections. The ATM manager
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 managers 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 transaction manager(s) at this point.
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.
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 manager is unable to quiesce global transactions for the database.
If operator intervention is possible, use Online Services to check
for incomplete transactions on the database. (use function Transaction Manager
Information > 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 manager or an external coordinator.
Caution:
Use of the STJ option for this purpose may lead to an
inconsistent result.
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.
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.
The following procedure should be followed when closing down an ATM transaction manager:
If you do not intend to restart the transaction manager 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 active
transaction list 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 manager is not executing, without incurring heuristic termination of
some transactions, and this could cause inconsistent results.
Issue the ATM END
command to the Adabas
System Coordinator daemon within which the ATM transaction manager is running
as a service.
If the transaction manager is unable to terminate immediately
because of incomplete global transactions, it will issue an ATM103 message for
each of the first five incomplete transactions. These messages will be repeated
at 60 second intervals until the transactions are completed and closedown
occurs. During this period you might choose to issue ATM
HALT
. The transaction manager should then terminate immediately,
leaving any unresolved work for completion during restart.
Runtime statistics are written on termination of the ATM transaction manager.
Close down the Adabas System Coordinator daemon, if desired.