SEP sesam Extension for DB2
Copyright © SEP AG 1999-2018. All rights reserved.
Any form of reproduction of the contents or parts of this manual is allowed only with the express written permission from SEP AG. When compiling and designing user documentation SEP AG uses great diligence and attempts to deliver accurate and correct information. However, SEP AG cannot issue a guarantee for the contents of this manual.
|This is not the latest version of SEP sesam documentation and, as such, does not provide information on features introduced in the latest release. For more information on SEP sesam releases, see SEP sesam Release Versions. For the latest documentation, check DB2 documentation.|
- 1 Introduction
- 2 System requirements
- 3 Installation
- 4 Configuration
- 5 DB2 Backup and Restore Configuration
- 6 Trouble shooting
- 7 Further Links/Literature
SEP sesam online backup for IBM DB2 Universal Database (UDB) provides a XBSA interface between DB2 and SEP sesam for saving data of DB2 databases to SEP sesam Server. XBSA API specifies the access from DB2 backup utility to a backup application. SEP sesam will manage the whole backup media handling like loading the correct tapes, whereas DB2 backup decides which data has to be saved or recovered.
This document provides information about the sesam specific parts of DB2 backups. It's not a DB2 backup administration guide. Please read DB2 administration documentation to get familiar with DB2's backup and recovery concepts and tools.
- SEP sesam Version 2.4 or higher
- the standard SEP sesam Backup Client is already installed
- working SEP sesam file system backups for this client
The SEP sesam DB2 package only includes one shared library which DB2 server loads dynamically during backup or restore. Please adjust the paths and variables according to your needs.
<SESAM_ROOT>/opt/sesam/bin/sesam(SEP sesam installation directory)
Installation on Linux or Unix
- First, verify that the standard SEP sesam Backup Client is already installed
- File system backup should work with this SEP sesam Client
- Login as root user
- Unpack tar file to a temporary directory
- Copy db2xbsa.so to
root@linux:~# cd /tmp root@linux:/tmp # tar xvzf sesam-db2-2.4.1-14_linux.i386.tgz sesam-db2-2.4.1-14/ sesam-db2-2.4.1-14/db2xbsa.so sesam-db2-2.4.1-14/sesam-db2.pdf root@linux:/tmp # cd sesam-db2-2.4.1-14/ root@linux:/tmp/sesam-db2-2.4.1-14 # cp db2xbsa.so /opt/sesam/bin/sesam
Configuration on SEP sesam Server
Create a new backup task for the DB2 server with task type DB2 UDB. Specifying a backup source is not important because DB2 decides which data has to be saved.
Configuration on DB2 server
To give DB2 the necessary information to connect to SEP sesam, the following options can be set:
- SESAM_SERVER Name of SEP sesam Server
- SESAM_JOB Jobname of DB2 backup name of an already configured task on SEP sesam Server with task type DB2 UDB
- SESAM_POOL Media pool name of an already configured media pool on SEP sesam Server
- SESAM_TAPE_SERVER Name of Remote Device Server to use
- SESAM_DRIVE Drive number to use
- XBSA_TRACE=<Trace level> (0|1|2|3) (if set with +128 then log XBSA trace output to STDERR, e.g. 2+128 -> 'set XBSA_TRACE=130')
- XBSA_LOGFILE=<Full pathname of trace file sdb2.log>
Although XBSA_TRACE and XBSA_LOGFILE are not mandatory, they should be set to get information in case of problems during backup or restore. For restore only SESAM_SERVER and SESAM_JOB are mandatory.
DB2 Backup and Restore Configuration
The following examples show, how backup or restores can be started on DB2 server. They do not cover all functions of DB2, but should give some hints for using DB2 backup and SEP sesam together.
Backup of complete database
db2inst@linux:~>db2 BACKUP DATABASE sample_db ONLINE \ LOAD /opt/sesam/bin/sesam/db2xbsa.so \ OPTIONS 'SESAM_SERVER=midrangix;SESAM_JOB=db2_sample_db; \ SESAM_POOL=DISK;XBSA_LOGFILE=/home/db2inst1/sdb2.log; \ XBSA_TRACE=1' INCLUDE LOGS WITHOUT PROMPTING;
Restore of complete database
db2inst@linux:~>db2 RESTORE DATABASE sample_db \ LOAD /opt/sesam/bin/sesam/db2xbsa.so \ OPTIONS 'SESAM_SERVER=midrangix;SESAM_JOB=abas_db2_2; \ XBSA_LOGFILE=/home/db2inst1/sdb2.log;XBSA_TRACE=1' \ TAKEN AT 20060113134350 TO "/tmp/db2restore" INTO sample_db2
Install into DB2 default library directory
Instead of copying the shared library into
<SESAM_ROOT>/bin/sesam directory and specifying the path
by the 'LOAD' command you can put it into the DB2 library directory on the DB2 server, too. Please
adjust the paths and variables according to your needs.
/opt/IBM/db2/V8.1(the DB2 product directory)
root@linux:~# cd /tmp/sesam-db2-2.4.1-14 root@linux:/tmp/sesam-db2-2.4.1-14 # cp db2xbsa.so /opt/IBM/db2/V8.1/lib
Then the db2 backup command has to be changed slightly. The 'LOAD' parameter is replaced by 'USE XBSA'.
db2inst@linux:~>db2 BACKUP DATABASE sample_db ONLINE USE XBSA \ OPTIONS 'SESAM_SERVER=midrangix;SESAM_JOB=db2_sample_db; \ SESAM_POOL=DISK;XBSA_LOGFILE=/home/db2inst1/sdb2.log; \ XBSA_TRACE=1' INCLUDE LOGS WITHOUT PROMPTING;
For troubleshooting IBM DB2 issues, see Troubleshooting IBM DB2.