Show TOC

db_activate RECOVERLocate this document in the navigation structure

Use

Use this command to initialize the data and log volumes of the current database, and import the data backed up in a complete data backup into the database. All the data previously contained in the current database is overwritten.

This command is also used to create a copy of a database, such as is required for the creation of a standby database.

Unlike the DBM command for recovering the database (see: recover_start) the db_activate RECOVER command deletes all catalog information and application data, as well as all entries in the log area of the database. The complete data backup is then imported and the database state it contains is recreated.

When you import the backup, all the original database user data of the target database are overwritten with the data of the source database. This is particularly significant if the source database from which the backup was created is different from the target database into which the backup is imported. To continue working with the target database, and in particular to load the system tables after importing the backup, you require the user data of the database system administrator of the source database. Only with this user data can you completely restore the data in the target database.

The DBM operator data of the target database is retained.

If you used another provider's backup tool to carry out the backups which are to be imported, use that tool to recover the database 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.

Note

If the automatic log backup function was active before the recovery was started, it is not re-activated automatically after the recovery. To re-activate the automatic log backup function, execute the DBM command autolog_on.

Prerequisites
  • You have the server permission Recovery.

  • The database is in the ADMIN operational state.

  • You have opened a database session (see: db_connect).

Structure

db_activate RECOVER <backup_template> [DATA] [ExternalBackupID <external_backup_ID>] [AUTOIGNORE] [ENCRYPT <encryption_algorith>] [<owner_list>]

<encryption_algothm> ::= AES128-CBC | AES192-CBC | AES256-CBC | DES-CBC | DES3-CBC

<owner_list> ::= <owner> | <owner> <owner> ...

<owner> ::= OWNER <owner_name>

Option

Description

<backup_template>

Name of the backup template, which refers to the data carrier or the group of parallel data carriers the backup is to be imported from.

DATA

Type of backup to be imported is DATA (complete data backup)

You only need to specify an entry here if you want to import a data backup in whose backup template (backup medium definition in earlier versions) the backup type was not specified.

ExternalBackupID <external_backup_ID>

To restore a backup created with a backup tool, enter the backup ID name known to this tool.

AUTOIGNORE

If you specify this option, the system automatically continues the operation for restoring multiple parallel data carriers when it has finished importing the data from one of these data carriers.

ENCRYPT <encryption_algorithm>

Algorithm to be used to encrypt the information

Possible values are: AES128-CBC | AES192-CBC | AES256-CBC | DES-CBC | DES3-CBC

Prerequisites: license for SAP Cryptolib (only available in SAP systems), private-public key pair has been created using sapgenpse

See also: Database Administration, Encryption

OWNER <owner>

Private key owner (see X.509 certificate), defines the encryption method

Result

OK

...

...

Table 1: Values for the Reply Fields

Value

Description

Date

Date

Time

Start time of the backup

Server

Name of the database computer

Database

Name of the database

Kernel Version

Version of the database kernel

Pages Transferred

Number of pages transferred

Pages Left

Number of pages still to be transferred

Volumes

Number of data carriers used

Medianame

Name of the backup template

Location

File or device name

Errortext

Error message text

See also:

Messages documentation

Label

Backup ID

Is Consistent

Only for data backup: Backup is internally consistent

First LOG Page

For data backup: First page of the log backup to be read

For log backup: First page saved in the log area

Last LOG Page

For log backup only: Last page saved in the log area

DB Stamp 1 Date

DB Stamp 1 Time

Time stamp for the first page of the log backup

DB Stamp 2 Date

DB Stamp 2 Time

Time stamp for the last page of the log backup

Page Count

Total number of pages backed up

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

Page number, use this number to compute the amount of space that should be at least available in the target system for the data pages (page number * 8 KB)

Converter page count

Converter page count, use this number to count the converter size

Redo Transactions Read

 

Redo Transactions Done

 

Reply in the Event of an Error

If an error occurs while you are using a backup tool, you will receive a reply in the following format:

ERR<NL> <errcode>, <err_description><NL> [<extended_description><NL>]

Table 2: Reply in the Event of an Error

Value

Description

<errcode>

Error Message Number

See: Messages documentation

<err_description>

Description of the error

<extended_description>

Cause of the error

The following errors may occur:

Table 3: Messages

Error Message Number

Error message text

Explanation

-24927

ERR_TOOLCHK: the external backup tool was not found

The backup tool could not be found or has been installed incorrectly.

-24926

ERR_MEDIUMCHK: the medium cannot be used with this external backup tool

The backup template specified cannot be used with this backup tool.

-24925

ERR_PREPARE: prepare of the backup operation failed

The preparations required to use the backup tool could not be completed correctly.

-24924

ERR_DBREQ: cannot start database kernel request

The database was unable to start the backup.

-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 or the backup tool.

-24921

ERR_POSTOP: cannot finish backup operation correctly

Although the backup was successful, the required post-processing steps could not be performed.

-24920

ERR_BACKUPOP: backup operation was unsuccessful

The backup failed due to a problem with the database or with the backup tool.

-24919

ERR_CLEANUP: cannot clean up correctly after backup operation

Although the backup was successful, the system resources used during the check could not be released.

More Information