Updating the Shadow Database

Note: This procedure must be carried out from the live database.

This procedure allows you to synchronise the Shadow Database with the live database. It involves switching the clean log on the live database, then replaying all clean logs since the last restored clean log onto the Shadow, except for the newly created clean log. The live database can remain active throughout.

Caution

If you carry out this procedure while the live database is still active, database resilience normally provided by Shadow Database is suspended until the procedure is completed and the Shadow Database partition is disabled. If the system crashes with both live and Shadow Databases active, both databases are at risk of corruption and a complete database restore of the last save and subsequent clean logs will be necessary on both databases.

Procedure

  1. Select option 9 on the Routine Maintenance menu. A message is displayed describing the purpose of the procedure – enter y  to continue.
  2. You are then asked:

    Do you want to disable the live database partition
    during this procedure (y/n/q) :

    Note: The mechanism for enabling and disabling databases is different on UNIX and Windows. Refer to Shadow Database Host Configuration.

    Enter y  to logoff users from the database and disable the partition. This protects the live database from being corrupted while the Shadow is being updated.

  3. Next you are prompted to switch to a new clean log before bringing the Shadow Database up-to-date. A menu similar to the following is displayed:

    Current Clean Log is : CLOG990816-01
    
    Switch to:
    
    1.  Another Clean Log for today (CLOG990816-02)
    2.  Next day's Clean Log (CLOG990817-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.

  4. You are then asked for confirmation that you want to switch to the specified clean log. Enter y  to confirm that you want to continue with the switch.
  5. You are then given the option to archive the previous clean log with the prompt:

    Do you want to archive previous Clean Log (y/n/q) :
    • Enter y  to archive the previous clean log, before performing the Shadow update.
    • Enter n  to omit the archive procedure and maintain the clean log on disk. Go to step 9.
  6. A list of tape units currently configured on the database is displayed, showing their status. You are then prompted to select one to carry out the archive.

    Caution

    tlmenu does not support archiving of multiple clean logs. The clean log archive procedure only dumps one clean log per tape. A separate tape must be used to archive each log file.

    Enter an available tape device number to archive the clean log. The new clean log is created and logging is switched to it.

  7. Once the clean log switch is completed, you are prompted to set up the tape device for the archive, with the prompt:

    Mount write enabled tape on Local tape unit n for Clean Log archive.
    
    Are you ready to continue (y/n/q) ? :

    Ensure that the tape is loaded correctly and that the tape device is on-line, then enter ‘y’ to archive the clean log to tape. The tape archive is also verified.

  8. Once the tape archive has been verified, you are prompted to remove the clean log from the live database with:

    Delete Clean Log clog_name from Disk (y/n/q) ? :

    Enter y  to remove the clean log, now archived to tape, from the database.

Restoring Clean Logs on the Shadow Database

  1. Once the clean log switch and associated operations have been completed, tlmenu continues by enabling the Shadow Database partition, disabling the live partition if selected, and unlocking the database ready to restore the previous day’s clean logs onto the Shadow Database.

    The following message is displayed:

    Locating next Clean Log to restore

    indicating that it is looking on the Shadow Database to determine the last clean log to be restored onto the database.

    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) ? :

    In this event continue with step 14.

  2. 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.

  3. You are prompted for the tape device to attach to the Shadow Database, as follows:

    Enter SHADOW tape unit : 

    Enter the tape device number.

  4. 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 onto the database.

  5. Once this is complete you are then asked if you want to proceed with 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 by entering n, the Shadow Database will not be completely updated.

    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 or to reload it from tape first. Steps 9 to 14 must then be repeated until the next clean log is the currently active one.

  6. Finally the Shadow Database is disabled, the live partition is enabled (if necessary), and the procedure ends with the messages:

    Restore of Clean Logs onto shadow database complete
    Update of shadow database complete
    Now secure shadow database with a Save

    You are then returned to the Routine Maintenance menu.

  7. Now use option 8 on the Routine Maintenance menu to save the Shadow Database to tape, as described in the procedure Saving the Shadow Database.

Go to top button