Restoring and Recovering the Database
In the event of a media failure or an operational or software error destroying the database, you must bring back the files that comprise the database and perform recovery. To fully recover the database to a consistent operational state, the database files from the last backup, all archived transaction journals created since the backup, and the online transaction journal are required.
The database can be recovered to the end of the last journal or it can be recovered to a specific date and time to reverse the effect of unwanted modifications to data.
Recovery to a specific date and time invalidates any existing later transaction journals. All transactions following that time are lost.
When a primary database or an offline copy of a primary database is opened, the current write journal (that is, the write journal that was open when the database was last closed) is mandatory.
The JADE Database utility Operation menu provides commands to facilitate database restoration and recovery, as follows.
-
The Restore Journals command restores a numbered range of archived transaction journals from a specified directory.
-
The Restore Database command provides a submenu that enables you to perform one of the following actions.
-
Restore your database with roll-forward recovery
Select the Restore And Roll-Forward command to restore a database from a JADE online or offline backup and perform a roll-forward recovery.
-
Restore your database with no recovery
Select the Restore With No Recovery command to restore a database from a JADE online or offline backup when you do not want a roll-forward recovery.
-
-
The Initiate Recovery command performs a roll-forward recovery of previously restored offline backup files.
For operational details, see "Using the Restore Journals Command", "Using the Restore Database Command", and "Using the Initiate Recovery Command", in Chapter 1.
The starting journal file number, offset within the journal, and an internal creation timestamp are retained in the control file, which must be part of the backup so that a roll-forward recovery always starts from the correct journal. If the required transaction journal is not present, a dialog prompts you to restore the file from backup.
If the journal timestamp and required sequencing information are not correct, an error is reported and recovery does not proceed. These checks protect against operational errors; for example, the loading of the wrong journal files. Journal files contain the timestamps of the prior and next journal files. Each successive journal is checked to ensure that it has the correct timestamp and that it contains precisely the next required record in sequence (by date, time, and sequence number) before processing of the journal proceeds.
Database backup recovery and roll‑forward recovery cannot be restarted. To keep the time taken to recover a database to a minimum, no checkpointing is performed during recovery. When the recovery operation is complete, a message in the following format is output to the jommsg.log file.
Database [secondary][archival|backup] recovery complete (elapsed time = nnn secs)
This message is logged after file data and headers are committed to disk. If the recovery is interrupted before this message is logged, the recovery is incomplete and the database must be restored before you restart the recovery process.