Swapping to the Shadow Database

This procedure allows you to close down a Shadow Database pair and start it up again in reverse configuration.

Note

  • This procedure must be carried out from the live database.
  • All users must be logged off.

Procedure

  1. Select option 3 on the Miscellaneous menu. A message is then displayed describing the purpose of the procedure — enter y  to continue.
  2. You are prompted with the message:

    Are all users logged off (y/n/q) ? :

    Enter y  if you are sure that there are no users logged on; otherwise you should first send a message to all users requesting them to log off, and continue after waiting a reasonable amount of time.

    This will kill the database daemon.

Bring the Shadow Up-to-date

  1. After killing the live database daemon, tlmenu starts the procedure to synchronise the Shadow Database with the live database, with the message:

    Starting procedure to roll forward Clean Log(s) onto shadow database

    The Shadow partition is enabled and the Shadow Database locked. Then the message:

    Locating next Clean Log to restore

    is displayed, 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 clean log that has been restored previously, in which case, it will display the message:

    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.

  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 then prompted for the tape device to attach to the Shadow Database, as follows:

    Enter SHADOW tape unit :

    Enter the 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.

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

  6. 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 (step 3).

    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 onto shadow database complete
    Shutting down live database...

    The Shadow Database daemon is then killed and the Shadow partition is disabled.

  7. Once the database has been shut down, the Shadow Database partition is re-enabled and the procedure started to restore the current active clean log onto the Shadow. The following messages are displayed:

    Now restoring current Clean Log onto shadow database...
    Do you want to tlrestore clog_name (y/n/q) ? :

    Enter y  to complete the clean log restore.

Reversing the Shadow Pair

  1. Once the Shadow is up-to-date with the live database, tlmenu swaps the Shadow Database pair, displaying the message:

    Reconfiguring live database as shadow...

    The new Shadow Database partition is then disabled.

  2. Next the procedure to re-configure the old Shadow Database as the 'live' is started, with the message:

    Reconfiguring shadow database as live...
    • On a UNIX system, the symbolic links to the live database and live clean log sub-directory are re-made.
    • On a Windows system, the database synonym entry in the Windows Registry is it updated.

Starting Logging on the New Live Database

  1. Once the re-configuring of the Shadow Database pair is complete, you are prompted to start logging on the new live database, as follows:

    Start logging to:
    1.  Another Clean Log for today (CLOG990817-01)
    2.  Next day's Clean Log (CLOG990818-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.

  2. After selecting a clean log name, you are asked :

    Do you want to start logging to Clean Log clog_name (y/n/q) ? :

    Enter y  to start logging to the new clean log. The new clean log is created on the live database and logging is started.

    You are then returned to the Miscellaneous menu.