SETUPRECOVERY [ ALLBASE/SQL Database Administration Guide ] MPE/iX 5.5 Documentation
ALLBASE/SQL Database Administration Guide
SETUPRECOVERY
Initiates a process of full rollforward recovery.
Scope
SQLUtil Only
SQLUtil Syntax
>> SETUPRECOVERY DBEnvironment Name: DBEnvironmentName Maintenance
Word: MaintenanceWord Recover To (mm/dd/y/hh/mm/ss) (opt): RecoverTime
New Log Mode (Single/Dual) (opt): NewLogMode Enter New Log File Name(s)
Separated By A Blank: NewLogFile1 [NewLogFile2] New Log File Size
(opt): NewLogSize Setup Recovery (y/n)? {Y[es]}
{N[o] }
Parameters
DBEnvironmentName is the name of the DBEnvironment you are
recovering.
MaintenanceWord is the maintenance word.
RecoverTime is the time up to which you want to recover the
DBEnvironment.
NewLogMode is either Single or Dual. This applies to the
new log, not to the one from which recovery is
carried out.
NewLogFile1 and are the names you are specifying for the new log.
NewLogFile2 Use both names for dual logging. If you specify
the optional account name, it must be the same as
the account of the DBECon file. Files are
created in the same group as the DBECon file
unless you specify a different group within the
DBECon file's account.
NewLogSize is the size of the new log in 512-byte pages.
Description
* This command starts a DBEnvironment session and lets you begin the
process of rollforward recovery after a DBEnvironment and its log
files have been restored.
* Rollforward recovery uses four commands:
SETUPRECOVERY or 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.
* SETUPRECOVERY should be done from the group and account from which
the DBEnvironment was originally stored (usually the group and
account containing the DBECon file and SYSTEM DBEFileSet).
* 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 recover all the
way forward to the point of 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.
* 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 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