 |
» |
|
|
|
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 DBEnviromnent
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, which initiates the process.
RESTORELOG, which restores one or more log files from a backup.
RECOVERLOG, which you issue for each log file being applied to the
DBEnvironment.
ENDRECOVERY, which 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
directory
which is different from the
directory
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 superuser, DBECreator or you must supply the correct
maintenance word to use this command. Example of Partial Recovery |  |
From the directory containing the DBECon file and the SYSTEM DBEFileSet,
use the the SQLUtil DETACHFILE command to detach all DBEFiles that wil
lbe acted upon by the partial roll forward recovery process. Move to a new directory which does not contain any DBECon file or
SYSTEM DBEFileSet to carry out the remainder of the partial roll forward recovery process. >> setuprecovery partial
DBEnvironment Name: tmpdbe
Maintenance Word: MaintenanceWord
Enter File to Restore or Carriage Return to Finish: ../PurchDF1
Enter File to Restore or Carriage Return to Finish: ../PurchXF1
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: /dev/rmt/0h
Local (y/n) (opt): y
Rename partslogA1 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 directory which contained the temporary DBEnvironment.
Return to the directory which contains the original DBEnvironment
and use the SQLUtil ATTACHFILE command to attach all DBEFiles that
were detached prior to the partial roll forward recovery process. */
|