You initialize the current database instance and recreate the database state saved in a complete data backup. During this procedure, all catalog information and application data is deleted, as are all entries in the log area of the database instance. Then the complete data backup is imported and the database state it contains is recreated.
Unlike the DBM command to recover the database instance (see: recover_start), after executing db_activate RECOVER you can only import log entries into the database instance from log backups that were completed beforehand, as the entries from the log area of the database instance are no longer available.
If you want to use entries from the log area of the current database instance to recover the most recent database state, before executing db_activate RECOVER you must save the log area on a backup medium, as otherwise the log entries are permanently lost.
If you used another provider’s backup tool to make the backups to be imported, use that tool to recover the database instance with initialization.
Once db_activate RECOVER has been executed, information on the recovery is displayed. This only happens when the backup has been completely imported or the process was interrupted. For this reason, the response to this DBM command can take a long time.
After recovery with initialization, you need to load the system tables. To do this you transfer the database system administrator’s data from the imported data backup to the Database Manager program (see: load_systab).
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 DBM command for activating automatic log backups (see: autolog_on).
· You have the server authorization Recovery.
· You have opened a database session (see: db_connect).
db_activate RECOVER <medium_name> DATA [ExternalBackupID <external_backup_ID>] [AUTOIGNORE]
Options
Option |
Description |
<medium_name> |
Medium from
which the backup is to be read. |
DATA |
Type of backup to be imported is DATA (complete data backup) |
ExternalBackupID <external_backup_ID> |
To restore a backup created with a backup tool, enter a backup ID name that this tool will recognize. |
AUTOIGNORE |
If you are restoring data in parallel, the process is automatically continued by the system. |
OK
Returncode <value>
Date [<value>]
Time [<value>]
Server [<value>]
Database [<value>]
Kernel Version [<value>]
Pages Transferred [<value>]
Pages Left [<value>]
Volume Count [<value>]
Medianame [<value>]
Location [<value>]
Errortext [<value>]
Label [<value>]
Is Consistent [<value>]
First LOG Page [<value>]
Last LOG Page [<value>]
DB Stamp 1 Date [<value>]
DB Stamp 1 Time [<value>]
DB Stamp 2 Date [<value>]
DB Stamp 2 Time [<value>]
Page Count [<value>]
Devices Used [<value>]
Values for the Reply Fields
Value |
Description |
Date |
Date |
Time |
Start time for the creation of the imported data backup |
Server |
Name of database computer |
Database |
Name of database instance |
Kernel Version |
Version of database kernel |
Pages Transferred |
Number of pages transferred |
Pages Left |
Number of pages still to be transferred |
Volumes |
Number of backup media used |
Medianame |
Name of backup medium |
Location |
File or device name |
Errortext |
Error message text |
Label |
Backup ID |
Is Consistent |
For data backup only: 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 |
For log backup only: 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 |
If an error occurs while you are using an external backup tool, you will receive a reply in the following format:
ERR<NL>
<errcode>, <err_description><NL>
[<extended_description><NL>]
<errcode> |
Error message number See: Messages |
<err_description> |
Error message text |
<extended_description> |
Cause of error |
The following errors may occur:
Error message number |
Error message text |
Cause of 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 could not be completed correctly. |
-24924 |
ERR_DBREQ: cannot start database kernel request |
The database instance was unable to start the restore/recovery 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 database instance or 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 of the backup tool. |
-24919 |
ERR_CLEANUP: cannot clean up correctly after backup operation |
Although the recovery was successful, the system resources used during the check could not be freed up again. |
Logging on to the DBMCLI as operator OLEG with password MONDAY, opening a database session with the database instance DEMODB, 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 OLEG,MONDAY –uDBS –d DEMODB db_activate RECOVER NSRPages DATA ExternalBackupID 9025