Disaster Recovery - SAP for MAXDB iDataAgent

Table of Contents

Overview

Plan for Disaster Recovery

Recover the MAXDB Database

Overview

The difference between a full MAXDB database restore and a full system rebuild is the severity of the problem. Normally, if data is lost or removed, it is recovered from the archives using the restore options available from the SAP command line.

However, when a normal restore operation cannot correct a software and/or hardware corruption problem on the client system (such as a damaged or destroyed operating system, hardware, hard drives, etc.), some level of full system restore is required.

Plan for Disaster Recovery

Before you begin a disaster recovery, make sure to do the following:

Recover the MAXDB Database

Whenever the MAXDB database is corrupted and a restore cannot recover the entire database, perform the following steps:

To recover the maxdb database

#> dbmcli -d CERT1 -u dbm,dbm db_cold
1. Build a secondary (destination) client machine (of a different name). Reinstall the SAP for MAXDB iDataAgent on the destination client.  Ensure that the database remains in ADMIN mode. #> dbmcli -d CERT1 -u dbm,dbm -uUTL

dbmcli on CERT1>db_state

OK

State

ADMIN

2. Create a database instance from CommCell Console.
3. Install the SAP Backint program. Create the media types and the backint configuration file.

To configure backint on Unix, run each of the commands

dbm_configset -raw BSI_ENV /<software install path>/SapMaxDbAgent/backint.conf

dbm_configset -raw set_variable_0 LD_LIBRARY_PATH=/<software install path>/Base

dbm_configset -raw set_variable_1 SHLIB_PATH=/<software install path>/Base

Include the following lines in .profile for AIX and HP-UX:

SHLIB_PATH=/<software install path>/Base:/<software install path>/Base64

export SHLIB_PATH

Include the following lines in .profile for Linux and Solaris:

LD_LIBRARY_PATH=/<software install path>/Base:/<software install path>/Base64

export LD_LIBRARY_PATH

4. To configure backint on Windows, run the command. The software install path should be the same as the path provided during the SAP for MAXDB on Windows installation. dbm_configset -raw BSI_ENV \<software install path>\
5. Specify the source client in the parameter file followed by the name of the source client.

On Unix (All Platforms):

Include this information in the param file under <software_install_folder>/SapMaxDbAgent.

On Windows:

Include this information in the param file under the SAP MAXDB config file directory that you provide in the installation pop-up window during the installation.

Example:

srccrossclient

magnum.company.com

6. Restore the dbm.knl and dbm.ebf files by performing one of the following:
  • Use Backint to restore the latest copy of these files manually.
     Example to restore dbm.knl and dbm.ebf files manually:
  1. Get the full set of backup job IDs. Specifically, create an input file called file1.txt. Ensure that the contents of the file is #NULL, and run an inquiry to get a list of backups.

 

  1. Using the last job ID to get the catalog files, create an input file called file2.txt, and include the last job ID in the file (e.g., SAP_0_28). Then execute the following command:

 

  1. Restore the catalog files. Specifically, create an input file called file3.txt. Include contents similar to the following in the file:

 

Then execute the following command to restore the dbm.knl and dbm.ebf catalog files:

 

  • If possible, enter the following dbmcli command:  backup_ext_ids <medium_using_Backint> <original_database_name>.
  • If possible, use the Restore without Backup History option in the DBMGUI recovery wizard provided by SAP.
 

 

For example:

backint -u -f inquire -t file -p param -l file1.txt

 

backint -u -f inquire -t file -p param -i file2.txt

 

 

SAP_0_28 d:\maxdb\sdb\data\wrk\CLDB\dbm.ebf
SAP_0_28 d:\maxdb\sdb\data\wrk\CLDB\dbm.knl

 

backup backint -u -f restore -t file -p param -i inp3.txt

7. Perform the required data restore to the destination client Data Restore:

#> dbmcli -d CERT1 -u dbm,dbm -uUTL

dbmcli on CERT1>db_state

OK

State

ADMIN

# dbmcli -d CERT1 -u dbm,dbm -uUTL

dbmcli on CERT1>backup_ext_ids_get BackData2

OK

dbmcli on CERT1>backup_ext_ids_list

OK

END

dbmcli on CERT1>recover_start BackData2 DATA ExternalBackupID "CERT1

dbmcli on CERT1>exit

OK

8. Perform the required log restore to the destination client

Log Restore:

#> dbmcli -d CERT1 -u dbm,dbm -uUTL

dbmcli on CERT1>db_state

OK

State

ADMIN

# dbmcli -d CERT1 -u dbm,dbm -uUTL

dbmcli on CERT1>backup_ext_ids_get BackData2

OK

dbmcli on CERT1>backup_ext_ids_list

OK

END

dbmcli on CERT1>recover_start BackLog LOG ExternalBackupID "CERT1

dbmcli on CERT1>recover_replace BackLog ExternalBackupID "CERT1

dbmcli on CERT1>exit

OK

Back to Top