TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)

364 Chapter7
Logging and Recovery
The Mirror Database
The Mirror Database
Transaction logging and regular backups are good maintenance. However, if databases
must be accessible at all times and cannot be down even for maintenance, then a different
maintenance method is needed. A system can be set up for constant access or "high
availability," and still have controlled maintenance.
The mirror database is the fundamental element in creating a high availability database
system. This system consists of two identical databases on two separate computer systems.
One database is housed on a primary system and is constantly accessible to users and
application programs. The other "mirror" database resides on the secondary system and is
used for maintenance.
To establish a mirror database, the following requirements are necessary:
Two systems--one primary, one secondary.
Two identical copies of the database(s) are needed, one copy on the primary system, one
on the secondary system.
All transactions on the primary system must be logged to a permanent file.
Periodically, the log file containing the transactions must be moved or copied to the
secondary system, and used to update the database(s) on the secondary system. It is
recommended that the log file be kept on a private volume separate from the database or
on magnetic tape.
After the secondary system is established, it can be used to make backups of the database.
The primary system never has to be brought down for maintenance.
Transferring Log Files
The GETLOG command with the AUTO option and the CHANGELOG command provide the
capability to schedule secondary system backups through various methods of logging.
Listed below are four ways of copying log files from the primary to the secondary system.
The method chosen should depend on the maintenance needs.
1. Copying files over a direct DSLINE from the primary to the secondary system.
2. Logging to a private volume, entering the CHANGELOG command to start a new log file,
copying the closed log file to another private volume, and physically transporting that
second private volume to the secondary system.
3. Logging to disk, entering the CHANGELOG command to start a new log file, copying the
closed log file from disk to tape, and restoring the log file from tape to a disk on the
secondary system.
4. Logging directly to tape and mounting the tape on the secondary system.
Figure 7-3. illustrates the four methods of copying log files as listed above.