Understanding SAP and DB2 integration

Data Protection for SAP for DB2® operates as a link between DB2 and the IBM Storage Protect™ server, enabling backup and restore operations for SAP databases.

Integration overview

Data Protection for SAP for DB2 operates as an unseen link between DB2 and the IBM Storage Protect. A shared library is dynamically linked by DB2 backup and archive processes.

Figure 1. Integration of Data Protection for SAP with DB2

The graphic shows how Data Protection for SAP operates as a link between DB2 and IBM Storage Protect. A backup or restore command is submitted through the DB2 Control Center with the DB2 command line processor. The DB2 agent accepts the command and data blocks are read from the DB2 database through a DB2 Vendor API. The shared library is dynamically linked and the data blocks are transferred from DB2 to the shared library. From the shared library, the data blocks are written to the IBM Storage Protect server.

DB2 command line processor

The DB2 Command Line Processor (CLP) interprets commands for the DB2 database and passes control to a DB2 Server Process. For Data Protection for SAP for DB2, the LOAD libraryname option instructs DB2 to start the Data Protection for SAP shared library. This process starts the backup or restore operation, dynamically loads the library, and communicates with Data Protection for SAP through the Vendor API.

For starting a backup or restore, the DB2 CLP communicates with the DB2 Server Process and provides information to the Server Process for processing the database.

Figure 2. DB2 backup architecture

This graphic shows the actions that are triggered by a backup database and a restore database command. It shows how the DB2 Server Process and IBM Storage Protect interact.
The DB2 BACKUP DATABASE command performs this DB2 Server process:
  • Creates a unique timestamp to identify the backup.
  • Loads Data Protection for SAP dynamically as a shared library.
  • Reads the data from the database containers.
  • Reads the DB2 configuration files.
  • Creates data blocks that contain the backup image and passes these blocks to the data mover part of Data Protection for SAP.
The Data Protection for SAP shared library sends the data to the IBM Storage Protect server storage (tape or disk). At the end of the backup process, the DB2 Server process logs the backup in the Recovery History File.

The DB2 RESTORE DATABASE command performs this DB2 Server process:

  • Loads Data Protection for SAP dynamically as a shared library.
  • Requests the backup data from the shared library.

The Data Protection for SAP shared library:

  • Checks with the IBM Storage Protect if the backup image is available.
  • Retrieves the data blocks from IBM Storage Protect.
  • Passes the data blocks to the DB2 Server Process.

The DB2 Server Process:

  • Restores the DB2 data to the database containers.
  • Logs the restore in the Recovery History File.

DB2 Backup Object Manager

The Backup Object Manager is a utility that performs these tasks:
  • Verify and store a IBM Storage Protect password.
  • Find backup objects in IBM Storage Protect.
  • Check the properties of the backup objects in IBM Storage Protect.
  • Remove any backup object from IBM Storage Protect.
  • Backup database and selected table spaces.
  • Restore database and table space backups to the corresponding database.
  • Retrieve files from IBM Storage Protect and restore them to the file system.
  • Perform a redirected restore of databases (cloning).

The Backup Object Manager is designed to handle DB2 log files that are archived with Data Protection for SAP, the SAP tool BRARCHIVE, and those files that are archived with Data Protection for SAP and the DB2 Log Manager. No special Backup Object Manager customization or configuration is necessary.

Figure 3. Data Protection for SAP Backup Object Manager

The graphic shows how the Backup Object Manager handles the requests for different data objects. To fulfill various backup and restore requests for either database data or files, the Backup Object Manager uses ProLE. ProLE gets information from the Configuration File and the Profile and sends the respective command to IBM Storage Protect.

The Backup Object Manager works with database backups, DB2 log files, and raw files that might comprise any files of the file system. The tasks that can be done with the Backup Object Manager are processed in different ways:
  • Requests to verify the IBM Storage Protect password are passed directly to IBM Storage Protect.
  • Requests to display or delete any data are answered by accessing the IBM Storage Protect server directly, thus working with the data that is available on IBM Storage Protect.
  • Requests to restore DB2 log files and raw files are also processed by using the IBM Storage Protect client.
  • Requests to back up or restore any DB2 database data are routed to the DB2 agent. The DB2 agent employs the Data Protection for SAP shared library.

The Backup Object Manager is available for use upon successful installation and setup of Data Protection for SAP. The Backup Object Manager uses the settings in the Data Protection for SAP profile, configuration file, and the settings of the XINT_PROFILE, TDP_DIR, and DB2_VENDOR_LIB environment variables. As a result, extra installation and setup steps are not required.