skip book previous and next navigation links
go up to top of book: HP OpenVMS System Manager's Manual, Volume 2:... HP OpenVMS System Manager's Manual, Volume 2:...
go to beginning of chapter: Managing DECdtm Services Managing DECdtm Services
go to previous page: Changing the Size of a Transaction Log Changing the Size of a Transaction Log
go to next page: Dismounting a DiskDismounting a Disk
end of book navigation links

Moving a Transaction Log  



You may want to move a transaction log if:

How to Perform This Task


CautionFollow all the steps carefully. Taking shortcuts can lead to data corruption.

  1. Decide the location that you want to move the transaction log to, using the guidelines in Deciding the Location of a Transaction Log. Remember that the disk must have enough contiguous space to hold the transaction log.
  2. Log in to the node that the transaction log belongs to.
  3. If you are in an OpenVMS Cluster, make sure that the disk you want to move the transaction log to is mounted clusterwide.
  4. Decide which directory you want to move the transaction log to. You may want to create a new directory for the transaction log.
  5. Find out which directory the transaction log is in, using LMCP's SHOW LOG command:SHOW LOG SYSTEM$node.LM$JOURNALwhere node is the name of the node that the transaction log belongs to.
  6. Rename the transaction log: RENAME dirspecSYSTEM$node.LM$JOURNAL dirspecSYSTEM$node.LM$OLD where:

    dirspec
    is the full specification of the directory containing the transaction log.
    node
    is the name of the node that the transaction log belongs to.

  7. Can you stop all the software that uses DECdtm services without shutting down any nodes?

    Yes
    Close the transaction log as follows:

    Step Action
    a. Stop all the software that uses DECdtm services.
    b. Close the transaction log using LMCP's CLOSE LOG command:
    $ RUN SYS$SYSTEM:LMCP
    LMCP> CLOSE LOG
    The CLOSE LOG command closes the transaction log and stops the DECdtm TP_SERVER process. The command fails if any software is using DECdtm services.
    c. Did the CLOSE LOG command succeed?
    Yes Restart the TP_SERVER process:
    $ @SYS$STARTUP:DECDTM$STARTUP.COM
    No Wait for 30 seconds, then repeat steps 7b and 7c.

    No
    Close the transaction log by rebooting the node. Log in to the node when it has rebooted.

  8. Make sure that SYS$JOURNAL points to the directory that you want to move the log to. If SYS$JOURNAL does not point to this directory, redefine SYS$JOURNAL: DEFINE/SYSTEM/EXECUTIVE_MODE SYS$JOURNAL dirspec[,...] where dirspec is the full specification of a directory containing one or more transaction logs. List all the directories that will contain transaction logs after you have moved the transaction log. You can list the directories in any order.

    In an OpenVMS Cluster, use SYSMAN to redefine SYS$JOURNAL clusterwide.
  9. If you redefined SYS$JOURNAL in step 8, edit the SYS$MANAGER:SYLOGICALS.COM command procedure to update the definition of SYS$JOURNAL.

    If you created node-specific versions of SYLOGICALS.COM, edit all the versions.
  10. Move the transaction log, using LMCP's CONVERT LOG command: CONVERT LOG old-dirspecSYSTEM$node.LM$OLD new-dirspecSYSTEM$node.LM$JOURNAL where:

    old-dirspec
    is the full specification of the directory that currently contains the transaction log.
    node
    is the name of the node that the transaction log belongs to.
    new-dirspec
    is the full specification of the directory that you are moving the transaction log to.

  11. If you stopped the software that uses DECdtm services in step 7, restart the software.
  12. Delete the old transaction log: DELETE dirspecSYSTEM$node.LM$OLD;where:

    dirspec
    is the full specification of the directory containing the old transaction log.
    node
    is the name of the node that the transaction log belongs to.

Example

This example shows how to move BLUE's transaction log. BLUE is in an OpenVMS Cluster. The cluster members and the locations of their transaction logs are as follows:

Node Directory Containing Log
BLUE
DISK$LOG1:[LOGFILES]
RED
DISK$LOG2:[LOGFILES]

Neither node has a node-specific version of SYLOGICALS.COM.

Decide where you want to move BLUE's transaction log to. In this example, assume that you want to move it to DISK$LOG3:[LOGFILES].

Log in to node BLUE. Then mount the disk clusterwide, and create a new directory for the transaction log:

$ MOUNT/CLUSTER/SYSTEM DUA3: LOG3
$ CREATE/DIRECTORY DISK$LOG3:[LOGFILES]
Find out which directory BLUE's transaction log is in, then rename the transaction log:
$ RUN SYS$SYSTEM:LMCP
LMCP> SHOW LOG SYSTEM$BLUE.LM$JOURNAL

Directory of DISK$LOG1:[LOGFILES]
 
SYSTEM$BLUE.LM$JOURNAL;1
 
Total of 1 file.
LMCP> EXIT
$ RENAME DISK$LOG1:[LOGFILES]SYSTEM$BLUE.LM$JOURNAL -
_$ DISK$LOG1:[LOGFILES]SYSTEM$BLUE.LM$OLD
Stop all software that uses DECdtm services. Then close the transaction log:
$ RUN SYS$SYSTEM:LMCP
LMCP> CLOSE LOG
Transaction log closed, TP_SERVER process stopped
LMCP> EXIT
Restart the TP_SERVER process:
$ @SYS$STARTUP:DECDTM$STARTUP.COM
Redefine SYS$JOURNAL:
$ RUN SYS$SYSTEM:SYSMAN
SYSMAN> SET ENVIRONMENT/CLUSTER
SYSMAN> DO DEFINE/SYSTEM/EXECUTIVE_MODE SYS$JOURNAL -
_SYSMAN> DISK$LOG2:[LOGFILES], DISK$LOG3:[LOGFILES]
SYSMAN> EXIT
Edit the SYS$MANAGER:SYLOGICALS.COM command procedure to update the SYS$JOURNAL definition. Then move the transaction log:
$ RUN SYS$SYSTEM:LMCP
LMCP> CONVERT LOG DISK$LOG1:[LOGFILES]SYSTEM$BLUE.LM$OLD -
_LMCP> DISK$LOG3:[LOGFILES]SYSTEM$BLUE.LM$JOURNAL
Log file DISK$LOG3:[LOGFILES]SYSTEM$BLUE.LM$JOURNAL;1 created.
Log file DISK$LOG1:[LOGFILES]SYSTEM$BLUE.LM$OLD converted.
LMCP> EXIT
Restart the software that uses DECdtm services. Then delete the old transaction log:
$ DELETE DISK$LOG1:[LOGFILES]SYSTEM$BLUE.LM$OLD;

go to previous page: Changing the Size of a Transaction Log Changing the Size of a Transaction Log
go to next page: Dismounting a DiskDismounting a Disk