skip book previous and next navigation links
go up to top of book: HP OpenVMS System Manager's Manual, Volume 1:... HP OpenVMS System Manager's Manual, Volume 1:...
go to beginning of chapter: Managing the Queue Manager and Queue Database Managing the Queue Manager and Queue Database
go to previous page: Using Multiple Queue Managers Using Multiple Queue Managers
go to next page: Maximizing Queuing System PerformanceMaximizing Queuing System Performance
end of book navigation links

Saving and Restoring the Queue Database  



Each time you want to preserve changes to your queue configuration, save a copy of your queue database files. In this way, if your queue database files are not accessible, you can restore the queue database you have saved; you thus avoid having to redefine forms and characteristics and reinitialize each queue.

Saving Queue Database Files  

To save a record-by-record copy of your queue database files while the queuing system is functioning, perform the following steps. This procedure saves definitions of queues, forms, and characteristics. No job information is preserved. (HP recommends not saving the journal file because timed and pending jobs might be reexecuted after the journal file is restored.)

How to Perform This Task

  1. To save the master file, enter an OpenVMS Convert utility (CONVERT) command in the following format:CONVERT/SHARE QMAN$MASTER.DAT master-filenamewhere master-filename is the name of the file to which QMAN$MASTER.DAT is to be copied.

    For more information about CONVERT, refer to the OpenVMS Record Management Utilities Reference Manual .
  2. Enter a CONVERT command in the following format to save the queue file:CONVERT/SHARE SYS$QUEUE_MANAGER.QMAN$QUEUES queue-filenamewhere queue-filename is the name of the file to which SYS$QUEUE_MANAGER.QMAN$QUEUES is to be copied.
  3. Use the Backup utility (BACKUP) to save the files created with CONVERT. Use a command in the following format:BACKUP/LOG masterfile-name, queue-filename device:saveset-name/LABEL=labelFor more information about the Backup utility, refer to the HP OpenVMS System Management Utilities Reference Manual.

Example

The following example is a simple procedure showing how to save the queue database.

$ SET DEFAULT SYS$COMMON:[SYSEXE]
$ CONVERT/SHARE QMAN$MASTER.DAT MASTERFILE_9SEP.KEEP;
$ CONVERT/SHARE SYS$QUEUE_MANAGER.QMAN$QUEUES QFILE_9SEP.KEEP;
$ INITIALIZE MUA0: QDB
$ MOUNT/FOREIGN MUA0:
%MOUNT-I-MOUNTED, QDB mounted on _LILITH$MUA0:
$ BACKUP/LOG MASTERFILE_9SEP.KEEP,QFILE_9SEP.KEEP MUA0:QDB_9SEP.SAV/LABEL=QDB
%BACKUP-S-COPIED, copied SYS$COMMON:[SYSEXE]MASTERFILE_9SEP.KEEP;
%BACKUP-S-COPIED, copied SYS$COMMON:[SYSEXE]QFILE_9SEP.KEEP;
$ DISMOUNT MUA0:

Restoring Queue Database Files  

When you restore queue database files, all queue, form, characteristic, and queue manager information is restored. However, information about jobs in the queues is not restored.

How to Perform This Task

  1. If the queue manager is running, stop it by entering the STOP/QUEUE/MANAGER/CLUSTER command.
  2. Delete all three queue database files. (You must delete all three files, even if only one or two of them are lost.)
    CautionWhen starting a queue manager on OpenVMS, the queue manager process always opens version number one of the queue journal file (SYS$QUEUE_MANAGER.QMAN$JOURNAL;1). For this reason, when you restore the queue system files with the Backup utility, you must ensure that the latest version of the queue journal file is version number one.

  3. Use the MOUNT command to mount the disk or tape containing the queue database backup.
  4. Use the Backup utility (BACKUP) to restore the queue file and master file from the save set you created in step 3 of Saving and Restoring the Queue Database. If the master file or queue file is stored in a location other than the default, make sure you restore it to the correct location or that you specify the new location when you start the queue manager.
    CautionWhen starting a queue manager on OpenVMS, the queue manager process always opens version number one of the queue journal file (SYS$QUEUE_MANAGER.QMAN$JOURNAL;1). For this reason, when you restore the queue system files with the Backup utility, you must ensure that the latest version of the queue journal file is version number one.


    NoteWhen you restore your queue database, you must always restore both the master and queue files, even if you lost only one of those files.

  5. Start the queue manager with the START/QUEUE/MANAGER command. Do not enter the /NEW_VERSION qualifier: a new, empty journal file will be created automatically.

Example

The following example is a simple procedure showing how to restore the queue database from tape.

$ STOP/QUEUE/MANAGER/CLUSTER
$ SET DEFAULT SYS$COMMON:[SYSEXE]
$ DELETE SYS$QUEUE_MANAGER.QMAN$JOURNAL;,SYS$QUEUE_MANAGER.QMAN$QUEUES;, -
_$ QMAN$MASTER.DAT;
$ MOUNT/FOREIGN MUA0:
%MOUNT-I-MOUNTED, QDB mounted on _LILITH$MUA0:
$ BACKUP/LOG MUA0:QDB_9SEP.SAV/SELECT=[SYSEXE]MASTERFILE_9SEP.KEEP; -
_$ QMAN$MASTER.DAT;
%BACKUP-S-CREATED, created SYS$COMMON:[SYSEXE]QMAN$MASTER.DAT;1
$ SET MAGTAPE/REWIND MUA0:
$ BACKUP/LOG MUA0:QDB_9SEP.SAV/SELECT=[SYSEXE]QFILE_9SEP.KEEP; -
_$ SYS$QUEUE_MANAGER.QMAN$QUEUES
%BACKUP-S-CREATED, created SYS$COMMON:[SYSEXE]SYS$QUEUE_MANAGER.QMAN$QUEUES;1
$ DISMOUNT MUA0:
$ START/QUEUE/MANAGER

go to previous page: Using Multiple Queue Managers Using Multiple Queue Managers
go to next page: Maximizing Queuing System PerformanceMaximizing Queuing System Performance