pdtrndec (Settle unsettled transactions forcibly and automatically)

Function

If there are unsettled transactions when HiRDB is restarted after an error or after normal termination (when the KFPS00992-E message is displayed), the pdtrndec command settles those transactions forcibly.

For details about handling unsettled transactions, see the HiRDB Version 8 System Operation Guide.

Executor

HiRDB administrator

Format

 pdtrndec -i input-file-name[,input-file-name]...

         [-r rollback-script-file-name] [-o output-destination-directory-name]

Options

Specifies the absolute path names of files created in syslogfile from KFPS00990-I messages.

Rules
  1. When you specify multiple files, the total specification length, including the separator commas, cannot exceed 4,096 characters.
  2. The execution results of this command cannot be guaranteed if a specified file was not created from KFPS00990-I messages.
  3. The input file names specification cannot contain any blanks.
  4. If information about an applicable transaction is missing from the input file (including when an invalid input file was specified), the transaction will be placed on hold without being settled.

Specifies the output file (pdtrnrbk.bat) from the previous execution of the pdtrndec command.

When this option is specified, the command terminates forcibly only the transactions in the rollback script file that remain to be settled. If the specified file is not a pdtrndec command output file, the command's execution results are not guaranteed.

Specifies that an execution history (pdtrndecout) is to be output when the pdtrndec command executes, and specifies the absolute path name of the directory to which the shell script (pdtrnrbk.bat) is to be output.

Rules
  1. When this option is omitted, the current directory is assumed as the output target.
  2. If the specified output target directory already contains the execution history and a shell script, the new execution history is added and the shell script is overwritten.
  3. If the -r option is also specified, the command does not output a shell script.
  4. The specification of the output target directory cannot contain any blanks.

Rules

  1. The pdtrndec command can be executed only when HiRDB is running.
  2. The pdtrndec command must be executed at the server machine that contains the single server or where the system manager is located.
  3. The pdtrndec command is executed when there are any unsettled transactions at the time HiRDB is restarted after an error or after having terminated normally. If you do not know whether or not there are any unsettled transactions, executing this command may settle transactions illegally.
  4. Do not execute the pdtrndec command more than once at a time. If multiple pdtrndec commands are executed concurrently, the execution results cannot be guaranteed.

Notes

  1. When you execute the pdtrndec command, all HiRDB servers (except recovery-unnecessary front-end servers) must be running. If there is any inactive server, start it with the correct procedure.
  2. When you execute the pdtrndec command, make sure that any HiRDB client products (such as OLTP system and HiRDB Datareplicator) are running normally. If there is any inactive HiRDB client product, start it with the correct procedure. You should note the following about settling transactions forcibly while there is an inactive client product:
    • If you execute the shell script (pdtrnrbk.bat) that is output after command execution, any transaction whose settlement was placed on hold by execution of the command will be rolled back forcibly. If you then start the inactive client product, synchronization may be lost between HiRDB and the client product.
  3. If executing the pdtrndec command with an input file specified still results in an unsettled transaction, execute the shell script (pdtrnrbk.bat) to settle the transaction.
  4. The pdtrndec command's processing may take a long time because it synchronizes with completion of other processing, such as transaction commit and rollback commands.
  5. After executing the pdtrndec command, delete the file under the output target directory specified in the pdtrndec command.
  6. The pdtrndec command's return codes are as follows:
    0: Normal termination
    4: Warning termination (there is still at least one unsettled transaction)
    8: Abnormal termination
  7. If you select utf-8 as the character encoding in the pdsetup command, you can use a file with a BOM as the input file for pdtrndec. Note that even when a file with a BOM is used as the input file for pdtrndec, the BOM is skipped. No BOM is included in the file that is output by pdtrndec.

Output format

Explanation
  1. Command start date and time (year/month/date hour:minute:second)
  2. Name of the host that contains an unsettled transaction (up to 32 characters)
  3. Global transaction ID that contains an unsettled transaction (16 characters)
  4. Branch transaction ID that contains an unsettled transaction (16 characters)
  5. Name of the server that contains an unsettled transaction (up to 8 characters)
  6. Settlement type of the unsettled transaction (up to 8 characters)
    The types are as follows:
    TypeDescriptionAction
    COMMITSettlement by forced commitNone
    ROLLBACKSettlement by forced rollbackNone
    FORGETForced terminationNone
    FAILSettlement by forced commit or rollback, or forced termination resulted in an errorEliminate the cause of the error and then re-execute the pdtrndec command
    ********Settlement on hold
    • For a HiRDB/Single Server, or for a HiRDB/Parallel Server when the pdtrndec command was executed on an input file of the system manager unit
      Change the input file and then re-execute the pdtrndec command.
    • For a HiRDB/Parallel Server when the pdtrndec command was executed on an input file of a unit where the system manager is not located
      Specify the shell script (pdtrnrbk.bat) and then re-execute the pdtrndec command.
  7. Time forced settlement was executed (hour:minute:second)
Explanation
  1. Command format for settling the transaction by rollback