RDB/VMS Relational Database Operator RECOVER — VMS CDD+_4.1A
Reconstructs a database by reentering past transactions from the after-image journal file in a database restored from a backup copy. The backup copy CANNOT be a file created by the RDO EXPORT statement. Use the RMU/BACKUP command to create backup copies of your Rdb/VMS databases. After-image journaling is especially useful for repairing a database after a disk failure.
Additional information available:
Format
RECOVER ──┬─>
F
I
L
E
N
A
M
E ───> file-spec ───┬───┐ └─>
P
A
T
H
N
A
M
E ───> path-name ───┘ │ │ ┌───────────────────<────────────────────┘ └───>
J
O
U
R
N
A
L ──> aij-journal-file-spec ─┐ │ ┌───────────────────<────────────────────┘ └─┬──────────────────────────────>────────────────┬──┐ └─>
N
U
M
B
E
R typebox (O)F
B
U
F
F
E
R
S typebox (I)typebox (S) ──> number-buffers ────┘ │ ┌───────────────────────────────<────────────────────┘ └┬─────>───────────┬───────┬────────>────────┬───────────> └──>
U
N
T
I
L time ──┘ ├──>
T
R
A
C
E ───────┤ └──>
N
O
T
R
A
C
E ─────┘
Additional information available:
file-specpath-nameaij-journal-file-spectimenumber-buffers
file-spec
The VMS file specification for the database to be recovered. If you use a partial file specification, Rdb/VMS uses it in conjunction with the fully qualified database file specification that is recorded in the specified after-image journal file. It is recommended that you use a fully qualified file specification instead of a partial file specification.
path-name
The path name that refers to the data dictionary entity for the database. You can specify a full or relative path name. When you specify PATHNAME, the fully qualified file specification that is recorded in the data dictionary is passed as the file specification for the database to be recovered.
aij-journal-file-spec
The file specification for the after-image journal file to be used as the source of the transactions that the RECOVER statement reenters in the database.
time
The time that represents the limit to the recovery operation. Use standard VMS absolute time format: dd-mmm-yyyy hh:mm:ss.cc
number-buffers
The number of database buffers used during the rollforward process. Specifying a large number of buffers results in a faster recovery time. The default is 20 buffers.
TRACE_NOTRACE
Specifies whether details of the rollforward process are displayed at your terminal. The default is NOTRACE.
Example
The following example shows how to recover a database using an after-image journal: $ ! Define a system-wide logical for the name of the $ ! AIJ file. $ ! $ DEFINE/SYSTEM J_FILE "DISK3:[DEPT3]PERS.AIJ" $ ! $ RUN RDO RDO> DEFINE DATABASE 'PERSONNEL'. RDO> ! RDO> ! Create after-image journaling. The journal file RDO> ! is given the logical name J_FILE. RDO> ! RDO> CHANGE DATABASE FILENAME 'PERSONNEL' JOURNAL J_FILE. RDO> EXIT $ ! $ ! Using the RMU/BACKUP command, make a backup copy of $ ! the database. This command ensures that you have a $ ! copy of the database at a known time, in a known state. $ ! $ RMU/BACKUP PERSONNEL MUA0:PERS_BACKUP.RBF $ ! $ ! Now you can use RDO with after-image journaling $ ! enabled. $ ! $ RUN RDO RDO> ! RDO> ! Invoke the database and perform some data RDO> ! definition and storage. RDO> ! RDO> INVOKE DATABASE FILENAME 'PERSONNEL' RDO> START_TRANSACTION READ_WRITE RDO> DEFINE FIELD NEWFIELD DATATYPE TEXT 10. RDO> DEFINE RELATION RELATION1. cont> NEWFIELD. cont> END. RDO> COMMIT RDO> STORE R IN RELATION1 USING cont> R.NEWFIELD = "data" cont> END_STORE RDO> COMMIT ! ! Assume a disk crash occurred here. ! The current database is inaccessible. ! You need a prior copy of the database ! to roll forward all subsequent transactions. ! RDO> FINISH RDO> EXIT $ ! $ ! You know that the backup copy of the database is $ ! uncorrupted. You can apply the AIJ file to it. $ ! Use RMU/RESTORE to restore the database. $ ! $ RMU/RESTORE/DIR=DISK1:[USER] MUAO:PERS_BACKUP.RBF $ ! $ ! LOOP: $ ! $ RUN RDO RDO> ! RDO> ! Use the RECOVER statement to roll forward the RDO> ! database changes contained in the after-image RDO> ! journal file. The date used in the UNTIL clause RDO> ! in this example represents some time in the RDO> ! future. This causes Rdb/VMS to apply the entire RDO> ! after-image journal file. RDO>5 RDO> RECOVER FILENAME 'DISK1:[USER]PERSONNEL' cont> JOURNAL J_FILE UNTIL 01-JAN-1999 RDO> EXIT $ ! $ ! If you want to apply more than one journal file to $ ! the same database, repeat the steps from the $ ! "LOOP:" label.