Library /sys$common/syshlp/LMCP$HLB.HLB  —  REPAIR
    Changes the state of transactions.

                                 CAUTION

       The REPAIR command can corrupt data. Use it only if none
       of the resource managers participating in the transaction
       provides a means of changing transaction states.

    Requires:

    o  The CMKRNL privilege.

    o  READ and WRITE access to the transaction log and the directory
       it is in.

    Format

      REPAIR  filespec

1  –  Parameter

 filespec

    The file specification of the transaction log containing the
    transactions whose states you want to change.

    The REPAIR command requires the following:

    o  The logical SYS$JOURNAL must be defined in executive mode in
       the system logical name table.

    o  The transaction log must be in a directory pointed to by the
       logical SYS$JOURNAL.

    o  The file type of the transaction log must be .LM$JOURNAL.

    The REPAIR command uses the following defaults:

    o  If you omit the disk and directory, the REPAIR command looks
       for the transaction log in the directories pointed to by the
       logical SYS$JOURNAL.

    o  If you omit the file type, the REPAIR command uses
       .LM$JOURNAL.

2    /LOGID

       /LOGID=logid

    Selects records only for transactions that have participants
    whose logid matches the specified value.

    The logid is in the Log ID field, to the right of the Type field
    in the output from the DUMP command. The value you specify must
    be exactly as it appears in the display, including hyphens.

    Note that you can use this qualifier only with the /RM qualifier.

3    /RM

       /RM=name

    Selects records only for transactions that have participants
    whose names begin with the specified value.

    The participant name is shown in the Name field in the output
    from DUMP, and is output in both ASCII and hexadecimal.

    If the participant name includes undisplayable characters, you
    can select records for that participant by using the hexadecimal
    form of its name. When specifying the hexadecimal form of
    the name, you must convert it by reversing the pairs in the
    hexadecimal number. For example, if the participant name is:

    Name (11): "SYSTEM$RED" (4445 52244D45 54535953)

    the value you specify for the /RM qualifier is:

    /RM=%X53595354454D24524544

4    /STATE

       /STATE=COMMITTED
       /STATE=PREPARED

    Selects records only for transactions in either the Committed or
    Prepared states.

5    /TID

       /TID=transaction_id

    Selects records only for the specified transaction.

    The transaction_id is shown in the Transaction ID field in the
    output from the DUMP command. The value you specify must be
    exactly as it appears in the display, including hyphens.

6  –  Description

    Use the REPAIR command to change the state of transactions.

                                 CAUTION

       The REPAIR command can corrupt data. Use it only if none
       of the resource managers participating in the transaction
       provides a means of changing transaction states.

    Use this command only if none of the resource managers
    participating in the transaction provides a means of changing
    the transaction state. For example, if Rdb is a participant in
    the transaction, do not use REPAIR; use the Rdb Management (RMU)
    utility commands instead. Similarly, if DBMS is a participant,
    use the Database Operator (DBO) utility commands.

    Change the transaction state only when you already know the
    outcome of the transaction and need to manually update the
    transaction log immediately. You might want to do this because,
    for example, you have lost the network link to a remote node.

    When you use the REPAIR command you use qualifiers to specify
    which transactions you want to change. By default, the REPAIR
    command selects all transactions.

    Once you have selected the transactions to change, you enter the
    REPAIR subcommand mode. Within this mode, the prompt changes to
    REPAIR> and you have a set of additional subcommands described
    in Subcommands of the REPAIR Command. You use these commands
    either to manually change the state of the transaction, or
    to select the next transaction that matches your selection
    criteria.  The subcommands are as follows:

    Subcommand  Action

    ABORT       Specifies that a Prepared transaction is to be
                aborted by removing its record from the transaction
                log. This writes a record of type Forgotten for the
                transaction.
                Note that DECdtm services use the presumed abort
                logging protocol.
    COMMIT      Specifies that a Prepared transaction is to be
                committed. This writes a record of type Committed
                for the transaction.
    EXIT        Returns to the LMCP> prompt.
    FORGET      Specifies that a Committed transaction can be removed
                from the transaction log. This writes a record of
                type Forgotten for the transaction.
    NEXT        Displays the next transaction that matches your
                selection criteria.

    LMCP displays each of the selected transactions in turn, so that
    you can change them. For each selected transaction, you can
    either use the ABORT, COMMIT, and FORGET subcommands to change
    the state of the transaction, or use the NEXT subcommand to
    select the next transaction.

    To exit from the REPAIR subcommand mode, enter the EXIT
    subcommand or press Ctrl/Z.

7  –  Example

  LMCP> REPAIR/STATE=PREPARED/RM="RMS$" DISK$JOURNALS:[LOGFILES]SYSTEM$ORANGE

      In this example transactions to be modified are selected from
      the transaction log for node ORANGE. The transactions selected
      are those that match both of the following criteria:

      o  RMS Journaling for OpenVMS is participating in the transaction.

      o  The transaction is in the Prepared state.
Close Help