HP 3000 Manuals

ENDRECOVERY [ ALLBASE/SQL Database Administration Guide ] MPE/iX 5.5 Documentation


ALLBASE/SQL Database Administration Guide

ENDRECOVERY 

Ends a rollforward recovery process that was started with SETUPRECOVERY.

Scope 

SQLUtil Only

SQLUtil Syntax 

>> ENDRECOVERY  DBEnvironment Name:  DBEnvironmentName  Maintenance Word:

MaintenanceWord  End Recovery (y/n)?  {Y[es]}
                                      {N[o] }
Parameters 

DBEnvironmentName       is the name of a DBEnvironment.

MaintenanceWord         is the maintenance word.

Description 

   *   This command starts a DBEnvironment session, and terminates a
       rollforward recovery process after all relevant log files have
       been applied in sequence.

   *   Rollforward recovery uses four commands:
          *   SETUPRECOVERY--initiates the process.
          *   RESTORELOG--restores a log file from a backup.
          *   RECOVERLOG--issued by you for each log file being applied
              to the DBEnvironment.
          *   ENDRECOVERY--ends the rollforward recovery process.

   *   You normally apply SETUPRECOVERY once.  You can specify a
       RecoverTime as the end point for recovery.  You then use
       RESTORELOG to restore each backup log file to the system in
       sequence number order, and you use RECOVERLOG once for each log
       file that you have restored, to apply it to the DBEnvironment.
       ALLBASE/SQL will recover the transactions in the file up to the
       RecoverTime you specified, or up to the end of the file.  You use
       ENDRECOVERY once after recovering all the log files you wish to
       apply to the DBEnvironment.  Normally, you do not use ENDRECOVERY
       if you specified a RecoverTime in the SETUPRECOVERY command.

   *   ENDRECOVERY will result in an error if you have not recovered
       enough files to make the DBEnvironment consistent.  If you used
       STOREONLINE to do an online backup of the DBEnvironment, you must
       recover starting from the First Log Sequence Number Needed for 
       Recovery up to and including the file that was active at the time
       the last STOREONLINE command completed.  If you did a static
       backup of the DBEnvironment, you can recover as little or as much
       of the log as you desire once you have restored the most recent
       copy of the DBEnvironment.

Authorization 

You must be the DBECreator or supply the correct maintenance word to use
this command.

Example 

     >> setuprecovery 
     DBEnvironment Name:  PartsDBE 
     Maintenance Word:   Return  
     Recover to: (mm/dd/yy/hh/mm/ss) (opt): Return 
     New Log Mode (Single/Dual) (opt): single 
     Enter New Log File Name(s) Separated by a Blank: newlg1 
     New Log File Size: 250 
     Setup Recovery (y/n)? y 

     Recovery Has Been Set Up.
     Next Log Sequence Number is       1.

     >> restorelog 
     DBEnvironment Name:  PartsDBE 
     Maintenance Word:   Return  
     Input Device: TAPE 
     Local (y/n) (opt): y 
     Restore the Log File (y/n)? y 
     Log File 'lgn1' was Restored.
     Rename 'lgn1' Log File To: newlog 
     Log File 'lgn1' was Renamed to 'newlog'.

     >> recoverlog 
     DBEnvironment Name:  PartsDBE 
     Maintenance Word:   Return  
     Next Log File To Recover: newlog 
     Recover Log (y/n)? y 

     Log File Recovered.
     Next Possible Log Sequence Number is       2.

     >> endrecovery 
     DBEnvironment Name:  PartsDBE 
     Maintenance Word:   Return  
     End Recovery (y/n)? y 

     Recovery Has Terminated.



MPE/iX 5.5 Documentation