Making the Current Database Live and Restoring the Latest Clean Logs
This procedure allows you to reconfigure the Shadow Database as the live one if the current live database fails. You can then restore normal Shadow operation using options 2 and 3 to recover the failed database and make it the Shadow.
Note
This procedure must be carried out on the Shadow Database.
Procedure
-
Select option 1 on the Database Recovery menu. A message is then displayed describing the purpose of the procedure and prompting you to confirm that you wish to continue.
When you enter
y
at the confirmation prompt, the procedure to re-configure the Shadow Database as the live one is initiated.
Bringing the Shadow Up-to-date
-
First, the Shadow is brought up-to-date with the failed live database by restoring all outstanding clean logs used since the last clean log restore onto the Shadow. This is started with the message:
Locating next Clean Log to restore
indicating that it is looking on the Shadow Database to determine the last clean log to be restored.
Note
After certain types of system or disk failures, tlmenu may fail to find the name of a previous clean log that has been restored on the Shadow Database. It then displays the messages:
Warning: Database has no current Clean Log Enter name of the first Clean Log to restore :
Caution
If you enter the wrong clean log name, the database will be corrupted.
Determine the name of the first clean log used on the live database since the last backup was carried out, and enter it here.
Clean log names are case sensitive. For example, CLOG must be entered as upper-case.
Having determined the name of the next clean log to be restored, tlmenu checks to see if it exists on disk.
If the clean log is present on the system, tlmenu asks:
Do you want to tlrestore clog_name (y/n/q) ? :
Enter
y
to restore the specified clean log onto the Shadow Database. Continue with step 8. -
If the next clean log does not exist on disk, tlmenu asks
Clean Log clog_name does not exist on disk, or is incomplete on disk.
Do you want to restore Clean Log clog_name from tape (y/n/q) ? :Enter
y
to load the clean log from tape onto the Shadow Database. -
You are then prompted for the tape device to attach to the Shadow Database, as follows:
Enter SHADOW tape unit :
Enter the required tape device number.
-
tlmenu then pauses to ensure that the clean log tape is mounted and ready to be loaded, displaying the prompt:
Is correct tape mounted on SHADOW tape unit n (y/n/q) ? :
Ensure that the correct tape is mounted and enter
y
to load the clean log from tape. -
Once the clean log has been loaded onto the database, you are asked if you want to start the restore:
Do you want to tlrestore clog_name (y/n/q) ? :
Enter
y
to restore the specified clean log onto the Shadow Database.Caution
If you abort the procedure at this stage by entering
n
, the Shadow Database will remain incomplete. -
On completing the restore, tlmenu looks for the next clean log in sequence. If it finds one, it re-prompts you either to restore it from disk onto the Shadow Database (step 3), or to reload it from tape first (step 4).
Steps 3 to 8 are repeated until the next clean log is the active clean log on the live database.
The procedure ends with the messages
Restore of Clean Logs complete Now reconfiguring shadow database as live database
Re-configuring the Shadow as Live
Next, tlmenu reconfigures the Shadow Database as the live database.
- On a UNIX system it re-makes symbolic links to the live database and live clean log sub-directory in the Shadow pair directory.
- On a Windows system, it updates the database synonym entry in the Windows Registry.
Starting Up Logging on the New Live Database
-
When re-configuration is completed you are prompted to start logging on the new live database with the menu prompt:
Restart logging to: 1. Another Clean Log for today (CLOG990816-02) 2. Next day's Clean Log (CLOG930817-01) 3. Clean Log for named day or date 4. A named Clean Log Enter option (1-4) : _
Select the option you require. See Clean Log Menu Options for an explanation of menu options.
-
After selecting a clean log name, you are asked for confirmation that you wish to start logging to it, with:
Do you want to restart logging to Clean Log clog-name (y/n/q) ? :
Enter
y
to commence Transaction Logging. The new clean log is created on the new live database and logging is started.The success of these operations is indicated by the messages:
[CTL4003] Log file clog-name created
[CTL4005] Transaction logging startedDatabase now reconfigured as live and Clean Logs have been restored.
Transaction Logging has been restarted and logons have been enabled.You are then returned to the Database Recovery menu.
- Now recover the failed database and make it the Shadow using Database Recovery option 2.