Restores a databank from a backup of LOGDB or from the information currently in LOGDB.
This form of ALTER DATABANK is used to recover a databank in the event of it being damaged or destroyed. You can use this SQL statement to restore the databank from information contained in the log records for the databank held in the current LOGDB or from a LOGDB backup. Refer to of the System Management Manual, Backing-up and Restoring Data, for details on Backup and Restore.
Before using the ALTER DATABANK RESTORE command a valid backup copy of the databank must be copied in place.
The recovery operation must start from a usable backup copy of the databank file, which has been created using the host file system backup or from a backup taken using CREATE BACKUP.
Once the restored databank file is in place, ALTER DATABANK is used to bring the databank up to date by applying any updates made to it since that copy of the databank file was taken. The updates may have been recorded in one or more backups of LOGDB and the latest updates will be contained in the log records in the LOGDB system databank.
When the LOG option is used, the updates for the databank recorded in the log records currently in LOGDB will be applied to the databank.
Note:The timestamp information contained in both the databank file and the LOGDB records must match, otherwise a backup sequence error is returned.
When the filename-string is specified, it names a backup LOGDB file. The updates contained in the file will be applied to the databank. Note that the timestamp information contained in both the databank file and the backup file must match, otherwise a backup sequence error is returned.
Only the creator of the databank or an ident with BACKUP privilege (e.g. SYSADM), may use the ALTER DATABANK RESTORE statement to restore it.
If the databank does not have LOG option, there will be no operations recorded in LOGDB.
It is possible to restore a databank that has been set offline.
The recovery operations performed using ALTER DATABANK RESTORE can only be applied to a copy of a databank file which has been placed in the original file location used by the databank.
If the copy of the databank file must be restored to a new location for some reason (e.g. a disk has been lost), then ALTER DATABANK is first used to change the databank file location.
ALTER DATABANK usrdb RESTORE USING 'usrdblog'
For more information, see the System Management Manual, Backing-up and Restoring Data.
Mimer SQL extension
The ALTER DATABANK RESTORE statement is a Mimer SQL extension.