When you recover a database instance, you import backups and recover the database status that they contain. To do so, you first import a complete data backup, followed by the related log backups. You can use the option UNTIL to specify the time up to which the log backups are to be imported from the backup medium. The volumes configured in the parameter file are created (if they are not available) and the data in the existing log volume is deleted.
Note that if you have not backed up this log data explicitly on a backup medium, this log data is deleted permanently.
Um dem Database Manager die Daten des SYSDBA aus der eingelesenen Sicherung zur Verfügung zu stellen, müssen Sie nach dem Wiederherstellen mit Initialisierung noch unter Angabe der Daten des SYSDBA die Systemtabellen laden (See also: Loading the System Tables)
If automatic log backups were activated before the restoration was started, they are not reactivated automatically after the recovery. To reactivate the log backups, execute the command for activating automatic log backups.
If you used an external backup tool to make these backups, use that tool to recover the database instance. Proceed as described in Restoring with External Backup Tools.
The reply to this command gives you information about the import of the backup. However, you see this information only if the backup has been imported completely, or if the backup was interrupted. This command may, therefore, take a long time to execute.
· You have the server authorization Recovery.
· You have opened a database session (Opening a Database Session).
db_activate RECOVER <medium> <type> [ExternalBackupID <external_backup_ID>] [<nnn>] [UNTIL <date> <time>] [AUTOIGNORE]
Options
Option |
Description |
<medium> |
Medium from which the backup is to be read. |
<type> |
Type of Backup, possible values: |
ExternalBackupID <external_backup_ID> |
To restore a backup created with an external backup tool, enter a backup ID name that the external tool will recognize. |
<nnn> |
nur bei einem Medium vom Typ FILE (Datei) relevant: |
UNTIL <date> <time> |
time (year, month, day, hour, minutes, seconds) up to which you want to import log backup |
AUTOIGNORE |
If you are restoring data in parallel, the process is automatically continued by the system. |
To avoid receiving error messages, follow the media naming conventions (see also: Defining or Changing a Backup Medium).
OK<NL>
Return code
<value><NL>
Date
[<value>]<NL>
Time
[<value>]<NL>
Server
[<value>]<NL>
Database
[<value>]<NL>
Kernel Version
[<value>]<NL>
Pages Transferred
[<value>]<NL>
Pages Left
[<value>]<NL>
Volumes
[<value>]<NL>
Medianame
[<value>]<NL>
Location
[<value>]<NL>
Error text
[<value>]<NL>
Label
[<value>]<NL>
Is Consistent
[<value>]<NL>
First LOG Page
[<value>]<NL>
Last LOG Page
[<value>]<NL>
DB Stamp 1 Date
[<value>]<NL>
DB Stamp 1 Time [<value>]<NL>
DB Stamp 2 Date
[<value>]<NL>
DB Stamp 2 Time
[<value>]<NL>
Page Count
[<value>]<NL>
Devices Used
[<value>]<NL>
Database ID
[<value>]<NL>
Max Used Data Page
[<value>]<NL>
Values for the Reply Fields
Date |
Date |
Time |
Time |
Server |
Name of the database server |
Database |
Name of the database instance |
Kernel Version |
Kernel version of the database |
Pages Transferred |
Number of pages transferred |
Pages Left |
Number of pages still to be transferred |
Volumes |
Number of backup media used |
Medianame |
Name of the backup medium |
Location |
File or device name |
Errortext |
Error message text |
Label |
Backup ID |
Is Consistent |
Only for data backup: backup is internally consistent |
First LOG Page |
For data backup: first page of log backup to be read For log backup: first page saved in log |
Last LOG Page |
Only for log backup: last page saved in log |
DB Stamp 1 Date |
Time stamp for first page of log backup |
DB Stamp 2 Date |
Time stamp for last page of log backup |
Page Count |
Total number of pages saved |
Devices Used |
Number of backup devices used |
Database ID |
Database ID used to identify data and log backups that belong together |
Max Used Data Page |
Maximum page number (indication of minimum database size when backup is imported) |
If an error occurs while you are using an external backup tool, you receive a reply in the following format:
ERR<NL>
<errcode>, <err_description><NL>
[<extended_description><NL>]
<errcode> |
Error message number See also: Messages |
<err_description> |
Error message text |
<extended_description> |
Cause of the error |
The following errors may occur:
Error message number |
Error message text |
Cause of the error |
-24927 |
ERR_TOOLCHK: the external backup tool was not found |
The external backup tool could not be found or has been installed incorrectly. |
-24926 |
ERR_MEDIUMCHK: the medium cannot be used with an external backup tool |
The specified backup medium cannot be used with the backup tool referred to by the medium name. |
-24925 |
ERR_PREPARE: prepare of the backup operation failed |
The preparations necessary to use the backup tool were not made correctly. |
-24924 |
ERR_DBREQ: cannot start database kernel request |
The database instance was unable to start the restore operation. |
-24923 |
ERR_TOOLREQ: cannot start external backup tool correctly |
The backup tool could not be started correctly. |
-24922 |
ERR_OPCHK: cannot check state of backup operation |
Unable to check the status of the database instance or the backup tool. |
-24921 |
ERR_POSTOP: cannot finish backup operation correctly |
Although the recovery was successful, the post-processing steps required could not be performed. |
-24920 |
ERR_BACKUPOP: backup operation was unsuccessful |
The recovery failed due to a problem with the database or the backup tool. |
-24919 |
ERR_CLEANUP: cannot clean up correctly after backup operation |
Although the recovery was successful, the temporary system resources used could not be freed up again. |
Logging on to the database manager CLI as operator DBM with password DBM, opening a database session with the database instance myDB, creating the database instance from a backup created with NetWorker on the backup medium NSRPages (complete data backup type with the external backup ID 9025):
dbmcli –u dbm,dbm –uDBS –d myDB db_activate RECOVER NSRPages DATA ExternalBackupID 9025