5 1 0:SAP MaxDB Restore to Another Instance
Overview
This article describes SEP sesam SAP MaxDB restore to another instance, introduced in version 4.4.3 Beefalo V2. For details on MaxDB backup and full restore with SAP ERP, see SAP ERP with MaxDB.
In case of a hardware or database failure, you can use SEP sesam to restore the data of the affected MaxDB database instance by importing all data backups and log backups of this database instance to another instance with initialization - using the command db_activate RECOVER.
This initializes the data and log volumes of the current database instance and imports the data backed up in a complete data backup to another database instance. All data that was previously contained in the current database instance is overwritten. For details on the command and its prerequisites, see db_activate RECOVER.
Requirements
To ensure error-free operation of SEP sesam and improve performance, make sure that the following conditions are met:
- Check the support matrix for the list of supported MaxDB versions. Note that all components for setting up the MaxDB extension are already included in the SEP sesam installation packages.
- SEP sesam Server v. 4.4.3 Beefalo V2 or higher. Check the hardware requirements for SEP sesam Server, RDS and SEP sesam Client.
- SAP MaxDB uses two areas to store data; the data area, where all data is stored, and the log area, where all changes to the data are stored.
- The configuration of the data/log area can be completely different than on the source system.
- It is necessary that both areas have the same identifier (DBIdent), otherwise a restore to another instance is not possible.
Steps
Restoring SAP MaxDB is performed using the Database Manager CLI (dbmcli) utility included in the MaxDB software. Note that this section only describes restoring a MaxDB database instance to another instance. For details on SEP sesam MaxDB full restore and DBM commands, see dbmcli calls.
To restore SAP MaxDB to another instance, proceed as follows:
- Call the Database Manager CLI and create a new database instance with two data files associated with it (one for log, one for data):
- Prepare the required backup media. Note that the name and path of the files should match those of the original database. For more details, see dbmcli calls.
- Put the database in admin mode and connect it via uUTL file information:
- Restore the data from the last full backup using the db_activate RECOVER command:
- The SAP MaxDB database must be brought into the online (warm) state:
db_create <database_name> <dbm_operator>,<dbm_operator_password>
Example:
dbmcli db_create FOO DBM,DBM /sapdb/programs/bin/dbmcli -d FOO -u DBM,DBM > param_startsession > param_init > param_commitsession > param_addvolume 1 DATA DISKD0001 F 32768
<medium_put> <medium_name> <location_type> <backup_type> [<size> [<block size> [<overwrite> [<autoloader>]]]]
Example:
medium_put BACKData /var/opt/sesam/var/ini//maxdb//DATA_data PIPE DATA 0 8 NO YES medium_put BACKLog /var/opt/sesam/var/ini//maxdb//DATA_log PIPE LOG 0 8 NO YES medium_put BACKPages /var/opt/sesam/var/ini//maxdb//DATA_pages PIPE PAGES 0 8 NO YES exit
<location> -d <database_name> -u <dbm_operator>,<dbm_operator_password> -uUTL
Example:
/sapdb/programs/bin/dbmcli -d FOO -u DBM,DBM -uUTL > dbm_configset -raw BSI_ENV /var/opt/sesam/var/ini/maxdb/bsi_DATA.env # Here you set the <tt>BSI_ENV</tt> of the original database for task/SEP sesam Server settings. > db_admin > db_connect > service_connect
db_activate RECOVER <medium_name> [ExternalBackupID <external_backup_ID>]
Example:
db_activate RECOVER BACKDAta ExternalBackupID "DATA DATA__9611349026 /var/opt/sesam/var/ini//maxdb//DATA_data"
The output should end with OK.
db_warm