RECOVERLOG [ ALLBASE/SQL Database Administration Guide ] MPE/iX 5.5 Documentation
ALLBASE/SQL Database Administration Guide
RECOVERLOG
Applies the transactions from a specific log file or multiple log files
during rollforward recovery.
Scope
SQLUtil Only
SQLUtil Syntax
>> RECOVERLOG DBEnvironment Name: DBEnvironmentName Maintenance Word:
MaintenanceWord Next Log File to Recover: LogFileName Recover Log File
(y/n)? {Y[es]}
{N[o] }
Parameters
DBEnvironmentName is the name of the DBEnvironment with which the
file(s) you are recovering is associated.
MaintenanceWord is the maintenance word.
LogFileName is the name of the file being recovered.
Description
* This command starts a DBEnvironment session, then lets you apply
individual log files for rollforward recovery after a
DBEnvironment and its log files have been restored. Rollforward
recovery uses four commands:
* SETUPRECOVERY or SETUPRECOVERY PARTIAL, which initiates the
process.
* RESTORELOG, which restores a log file 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 or SETUPRECOVERY PARTIAL once.
For SETUPRECOVERY you can specify a RecoverTime as the end point
for recovery. For SETUPRECOVERY PARTIAL you must roll forward 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 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.
* At the completion of each RECOVERLOG command, the next possible
log sequence number is displayed.
* If you specified a RecoverTime in the SETUPRECOVERY command, the
following message appears when you reach the specified time stamp:
Time Stamp Reached.
When you see this message, recovery is complete. In this case,
you do not use the ENDRECOVERY 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 log 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
To use this command, you must be the DBECreator or supply the correct
maintenance word.
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 File (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