HPlogo ALLBASE/SQL Database Administration Guide: HP 3000 MPE/iX Computer Systems > Appendix F SQLUtil

SETUPRECOVERY PARTIAL

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

This command initiates a process of partial rollforward recovery. When SETUPRECOVERY PARTIAL is used, a temporary DBEnvironment is created for the rollforward recovery process.

Scope

SQLUtil Only

SQLUtil Syntax - SETUPRECOVERY PARTIAL

>> SETUPRECOVERY PARTIAL New DBEnvironment Name: TempDBEnvironmentName Maintenance Word: Maintenance Word Enter DBEFileName or Carriage Return to Finish: SystemFileName Enter DBEFileName or Carriage Return to Finish: Setup Recovery (y/n)? { Y [es] N [o]}

Parameters

TempDBEnvironmentName

is the name of the temporary DBEnvironment you are using to perform a partial rollforward recovery.

MaintenanceWord

is the Maintenance Word for the temporary DBEnvironment.

SystemFileName

is the physical name of the DBEFile to be recovered. You will be prompted for a list of file names one name per line. Enter a blank line with a carriage return to terminate the list.

Description

  • The SETUPRECOVERY PARTIAL command starts a DBEnvironment session and lets you begin the process of partial rollforward recovery on an existing DBEnvironment. This allows you to do rollforward recovery on a subset of the DBEnvironment while the intact portion of the DBEnvironment remains in use.

  • DBEFiles must be specified individually on a file by file basis; you cannot specify a DBEFileSet name to be restored.

  • Partial rollforward recovery uses four commands:

    • SETUPRECOVERY PARTIAL—initiates the process.

    • RESTORELOG—restores one or more log files 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 PARTIAL once. When using SETUPRECOVERY PARTIAL you must roll forward all the way to the point of the failure. 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 end of the file.

  • You use ENDRECOVERY once after recovering all the log files you wish to apply to the DBEnvironment.

  • ENDRECOVERY will result in an error if you have not recovered enough files to make the DBEnvironment consistent. If you did a static backup of the DBEnvironment, you must still recover up to the moment of the failure if doing a partial rollforward recovery. You must be sure to recover all files that will be acted upon by the rollforward process in order to maintain a consistent database. (This includes files that were undamaged by the failure, but will still be acted upon by recovery. All files touched by recovered transactions must be recovered from the last static backup.)

  • When performing SETUPRECOVERY PARTIAL you should be in a group and account which is different from the group and account which contains the existing DBECon file and SYSTEM DBEFileSet because a new, temporary DBECon file and SYSTEM DBEFileSet are created for the partial rollforward recovery process. This also isolates the log files used for the partial recovery process so there can be no accidental interaction between the active log files and those used for the recovery process.

  • When you are performing a SETUPRECOVERY PARTIAL, the DBEnvironmentName must be different from the original DBEnvironmentName.

  • If a Maintenance Word is specified in a SETUPRECOVERY PARTIAL, it is stored in the temporary DBEnvironment. Later the Maintenance Word can be used to execute the RECOVERLOG and the ENDRECOVERY commands.

  • The temporary DBEnvironment created for a partial rollforward process is purged when the recovery is completed as are the temporary DBECon file and temporary SYSTEM DBEFiles. However, the log files applied during the partial recovery process must be explicitly removed using the SQLUtil PURGEFILE command after the ENDRECOVERY command has been executed.

Authorization

You must be the DBECreator or supply the correct Maintenance Word to use this command.

Example of Partial Recovery

From the group and account containing the DBECon file and the SYSTEM DBEFileSet, use the SQLUtil DETACHFILE command to detach all DBEFiles that will be acted upon by the partial roll forward recovery process.

Move to a new group in the same account, which does not contain any DBECon file or SYSTEM DBEFileSet, to carry out the remainder of the partial rollforward recovery process.

                

   >> setuprecovery partial

   DBEnvironment Name:  tmpdbe

   Maintenance Word:  MaintenanceWord

   Enter File to Restore or Carriage Return to Finish:    OrderDF1.OtherGroup

   Enter File to Restore or Carriage Return to Finish:   OrderXF1.OtherGroup

   Enter File to Restore or Carriage Return to Finish: 



 

   Setup Recovery (y/n): y



   Recovery Has Been Setup.

   Next Log Sequence Number is 2.



 

   >> restorelog

   DBEnvironment Name:  tmpdbe

   Maintenance Word:  MaintenanceWord

   Input Device: TAPE

   Local (y/n) (opt): y

   Rename ptslogA1 Log File To: lsn002

   Restore the Log File (y/n)?y



   Log File 'lsn002' was Restored.



 

   >> recoverlog

   DBEnvironment Name:  tmpdbe

   Maintenance Word:  MaintenanceWord

   Next Log File To Recover: lsn002

   Recover Log File (y/n)?y



   Log File Recovered.

   Next Possible Log Sequence Number is      3.


Repeat the restorelog/recoverlog sequence until all log files have been applied up to the time of the failure.



   >> endrecovery

   DBEnvironment Name:  tmpdbe

   Maintenance Word:  MaintenanceWord

   End Recovery (y/n)?y



   Recovery Has Terminated.

Remove the log files that remain after the partial recovery process from the group which contained the temporary DBEnvironment. Return to the group which contains the original DBEnvironment and use the SQLUtil ATTACHFILE command to attach all DBEFiles that were detached prior to the partial rollforward recovery process.

Feedback to webmaster