Nonstop Database, HiRDB Version 9 System Operation Guide

[Contents][Index][Back][Next]

20.14.1 Forcing determination of uncompleted transactions

The KFPS00992-E message is output for each undetermined transaction (transaction branch that cannot be determined). When this happens, the HiRDB administrator must force determination of each such transaction that is uncompleted by following the procedure described below.

When pd_trn_rerun_branch_auto_decide = Y (default value) has been specified, determination of uncompleted transactions is performed automatically. If a transaction cannot be determined by this automatic determination facility or if you do not use this facility, you must perform the operation explained below.

Procedure
[Figure]
[Figure]

Notes
  • The numbers to the left of the process boxes correspond to the paragraph numbers of the explanations on the following pages. For example, step 5 is explained in paragraph (5) below.
  • Messages can be checked during the procedure explained below. To do so, reference the messages in syslogfile.
Organization of this subsection
(1) Check for undetermined transactions
(2) Start the client product
(3) Start the servers that have stopped
(4) Perform transaction determination manually on undetermined transactions
(5) Create input files for the pdtrndec command (for the unit where the system manager is located)
(6) Using the input files created in (5), execute the pdtrndec command
(7) Create input files for the pdtrndec command (for each unit where the system manager is not located)
(8) Create input files for the pdtrndec command (for the unit where the system manager is located)
(9) Using the input files created in (7) and (8), execute the pdtrndec command
(10) Check the transaction status
(11) Check for the KFPS02183-I message
(12) Delete unneeded files

(1) Check for undetermined transactions

Check the KFPS00992-E messages to determine if there are undetermined transactions.
 
KFPS00992-E Unable to determine commit or rollback for transaction branch.
TRNGID=HRD1unt100020b4d, TRNBID=HRD1unt100020034, server=bes1, service=p_f_sqa_call
 
KFPS00992-E Unable to determine commit or rollback for transaction branch.
TRNGID=HRD1unt100020b22, TRNBID=HRD1unt100020035, server=bes1, service=p_f_sqa_call
 
KFPS00992-E Unable to determine commit or rollback for transaction branch.
TRNGID=HRD1unt100020b5a, TRNBID=HRD1unt100020036, server=bes1, service=p_f_sqa_call
 

Explanation
A KFPS00992-E message displays a transaction branch that could not be committed or rolled back. In the case shown above, the transactions indicated by the following transaction identifiers might be undetermined:
  • TRNGID=HRD1unt100020b4d
  • TRNGID=HRD1unt100020b22
  • TRNGID=HRD1unt100020b5a

If there are no undetermined transactions, no further action is necessary.

(2) Start the client product

Check whether the product used as the HiRDB client (OLTP system or HiRDB Datareplicator, for example) is running normally. If not, start it using the procedure appropriate to the particular product.

Note the following about forcing determination of a transaction while there is a stopped client product:

To maintain transaction integrity, it is important that you do not execute any new transactions from this point on during this procedure.

(3) Start the servers that have stopped

Use the pdls command to check if all servers (excluding recovery-unnecessary front-end servers) are running. If any server is not running, start it.

Note the following about forcing determination of a transaction while there is a stopped server:

(4) Perform transaction determination manually on undetermined transactions

Perform transaction determination manually on the undetermined transactions. For details about the manual determination procedure, see 20.14.2 Performing transaction determination manually on undetermined transactions.

(5) Create input files for the pdtrndec command (for the unit where the system manager is located)

Use the grep command to create input files for the pdtrndec command. This applies only to the unit where the system manager is located. The files you create with the grep command are for KFPS00990-I messages.

 
grep "KFPS00990-I" /usr/adm/OLDsyslogfile >/tmp/unit1syslog.copy
grep "KFPS00990-I" /usr/adm/syslogfile >/tmp/unit1syslog2.copy
           1                 2                     3
 

Explanation
  1. Specifies the KFPS00990-I character string as the pattern for execution of the grep command.
  2. Specifies the absolute path name of a syslogfile to be extracted (syslogfile of the unit where the system manager is located).
  3. Specifies the absolute path name of an input file for the pdtrndec command.
    Hint
    • To avoid adverse impacts on syslogfile from a direct access, extract from syslogfile only the row containing the character string "KFPS00990-I" and save it in a file of your choice. If the extracted contents are processed, the results of the pdtrndec command that will be executed in step (6) cannot be guaranteed. For this reason, you must not perform any processing other than execution of the grep command.
    • Because syslogfile might have been swapped, all syslogfiles that have been created since the system started normally (time at which the KFPS05210-I message was output after the KFPS01803-I start mode=S message had been output) must be used as input targets. If there is no syslogfile that includes the time at which the system started normally, use all existing syslogfiles as input targets.
    • The absolute path name of a syslogfile to be input depends on the platform. Specify the absolute path name specified in /etc/syslog.conf.

(6) Using the input files created in (5), execute the pdtrndec command

 
pdtrndec -i /tmp/unit1syslog.copy,/tmp/unit1syslog2.copy
 

Explanation
-i: Specifies input of the files created in (5).

Check the items listed under DECISION (transaction determination type) in the command execution results. Then continue the procedure by following the steps in the flowchart.

 
pdtrndec result                     START TIME:2002/09/05 17:20:08
HOSTNAME    TRNGID           TRNBID           SVID      DECISION    TIME
host1       HRD1unt100020b4d HRD1unt100020034 bes1      COMMIT      17:20:08
host1       HRD1unt100020b22 HRD1unt100020035 bes1      ********    --:--:--
host1       HRD1unt100020b51 HRD1unt100020038 bes1      FORGET      17:20:09
pdtrndec result                     START TIME:2002/09/05 17:36:47
HOSTNAME    TRNGID           TRNBID           SVID      DECISION    TIME
host1       HRD1unt100020b22 HRD1unt100020035 bes1      ********    --:--:--
 
 
Note
If there are still any undetermined transactions after the pdtrndec command has executed, a pdtrnrbk.bat file is created. However, do not execute pdtrnrbk.bat at this point. If you execute it, you might lose transaction synchronization. Also, if the KFPS00982-E message is output when a pdtrnrbk.bat file is created, delete the pdtrnrbk.bat file without using it.

(7) Create input files for the pdtrndec command (for each unit where the system manager is not located)

Use the grep command to create input files for the pdtrndec command. This applies only to each unit where the system manager is not located. The files you create with the grep command are for the KFPS00990-I messages.

 
grep "KFPS00990-I" /usr/adm/OLDsyslogfile >/tmp/unit2syslog.copy
grep "KFPS00990-I" /usr/adm/syslogfile >/tmp/unit2syslog2.copy
           1               2                     3
 

Explanation
  1. Specifies the KFPS00990-I character string as the pattern for execution of the grep command.
  2. Specifies the absolute path name of a syslogfile to be extracted (syslogfile of a unit where the system manager is not located).
  3. Specifies the absolute path name of an input file of the pdtrndec command.
    Hint
    • To avoid adverse impacts on syslogfile from a direct access, extract from syslogfile only the row containing the character string "KFPS00990-I" and save it in a file of your choice. If the extracted contents are processed, the results of the pdtrndec command that will be executed in step (8) cannot be guaranteed. For this reason, you must not perform any processing other than execution of the grep command.
    • Because syslogfile might have been swapped, all syslogfiles that have been created since the system started normally (time at which the KFPS05210-I message was output after the KFPS01803-I start mode=S message had been output) must be used as input targets. If there is no syslogfile that includes the time at which the system started normally, use all existing syslogfiles as input targets.
    • The absolute path name of a syslogfile to be input depends on the platform. Specify the absolute path name specified in /etc/syslog.conf.

(8) Create input files for the pdtrndec command (for the unit where the system manager is located)

Use the same method as in step (5) to create input files for the pdtrndec command.

(9) Using the input files created in (7) and (8), execute the pdtrndec command

Using the input files created in steps (7) and (8), execute the pdtrndec command to force determination of the transactions. If the return code indicating the final status after the first execution of the pdtrndec command is 4 and ******** is listed under DECISION for a transaction, specify the option shown below and execute the pdtrndec command again.

 
pdtrndec -i /tmp/unit1syslog.copy,/tmp/unit1syslog2.copy,/tmp/unit2syslog.copy,
/tmp/unit2syslog2.copy -r pdtrnrbk.bat
 

Explanation
-i: Specifies input of the files created in steps (7) and (8).
-r: Specifies the files of the shell script (pdtrnrbk.bat) created in step (6).

If the KFPS00982-E message is output when a pdtrnrbk.bat file has been created, delete the pdtrnrbk.bat file without using it.

(10) Check the transaction status

Use the pdls -d trn command to check if all transactions have been determined. If an undetermined transaction remains, check the output message and command execution results, take the necessary corrective action, and then repeat the steps beginning with (7).

 
pdls -d trn
 
HOSTNAME : host1(153415)
TRNGID           TRNBID           STATUS        PID   SVID   B-SVID
 

Explanation
No transaction information is displayed, which means that all transactions have been determined.

(11) Check for the KFPS02183-I message

Once all undetermined transactions have been determined, the KFPS02183-I message is output within 30 seconds. If the KFPS02183-I message is not output after 30 seconds, an undetermined transaction remains. In such a case, repeat the procedure from the start.

(12) Delete unneeded files

Delete the files (such as pdtrndecout and pdtrnrbk.bat) under the output destination directory specified by the pdtrndec command.