UNIX Server Configuration
On the SUN Solaris machine that holds my test database
ARTIST, the TSM API client, version 22.214.171.124 has been installed. The TSM API is
used to demonstrate the TSM system usage.
# pkginfo -l TIVsmCapi
NAME: Tivoli Storage Manager
Solaris 2.6/7/8 API Client
VERSION: Version 4 Release 2 Level 2
VENDOR: Tivoli Systems Inc.
INSTDATE: Sep 06 2002 11:31
STATUS: completely installed
FILES: 120 installed pathnames
2 setuid/setgid executables
25570 blocks used (approx)
Tivoli Storage Manager
Command Line Backup Client Interface -
Version 4, Release 2, Level 2.1
(C) Copyright IBM Corporation, 1990, 2001,
All Rights Reserved.
The TSM client installation results in new entries in the
DB2 instance owner profile. New in the profile defined environment variables
and their corresponding contents:
path to TSM system options file ( dsm.sys
path to TSM client options file ( dsm.opt )
Path to TSM API error log file ( dsierror.log )
# cat .profile | grep DSMI
The unique, server specific TSM system options file dsm.sys
has been updated with the following new entries:
# cat dsm.sys
Additionally, the listed INCLEXCL parameter file explains the
TSM API configuration:
# cat inclexcl.def
include /ARTIST/DB2_BACKUP*.* MGMT_BACKUP
include /ARTIST/NODE0000/S*.LOG MGMT_LOGS
The TSM client option file, dsm.opt, one per client on the
UNIX machine, has only one entry:
# cat dsm.opt
The parameter SERVERNAME, given in the client
configuration file, is only an alias to the system options file dsm.sys. All
necessary configuration entries have been done through the dsm.sys options
The final preparation
step is the configuration of the database user exit program, db2uext2.cadsm,
devoted to TSM usage. This add-on IBM program manages the database archived log
files and externalizes them on the TSM server backup media. During a recovery
operation, the user exit program retrieves the log files from the TSM server,
putting them into the database log path directory.
Some peculiarities of the user
- filed but still active database
log file is opened in read only mode and archived by the user exit program, and
remains in the log path directory until the transaction ends
- archived log files are renamed
and reused--the user exit program never deletes them
- following database deactivation,
the last active log file (full or partially filled) is closed and via the user
exit program saved to the TSM
- all log files are truncated
before archiving, in free unused log space
IBM suggests using the user exit
program that comes with database installations. Nevertheless, the customer has the
choice to use his own exit program in the same manner. The provided user exit
programs need to be compiled and adopted before actual usage.
The procedure for the user exit
artist$ su -
root# cd $HOME/sqlib/adm
root# cp $HOME/sqllib/samples/c/db2uext2.cadsm $HOME/sqllib/adm/db2uext2.c
root# vi db2uext2.c
#define ARCHIVE_PATH "/ARTIST/NODE0000"
#define RETRIEVE_PATH "/ARTIST/NODE0000"
#define AUDIT_ERROR_PATH "$HOME/sqllib/tsm"
artist$ cc_r -o db2uext2 db2uext2.c libApiDs.a
A compiled user exit program is
afterwards saved in the /sqllib/adm instance software directory.
It was important to present a real-world
example of the TSM infrastructure, which can be used as template for other more
complicated configurations. DB2 administrators need to be familiar with the
infrastructure so that they can suggest backup improvements or in the case of
errors, trace faulty backup execution. Part two of this article will examine
DB2 database backup techniques and reveal some little known situations that
arise only when using TSM server.
See All Articles by Columnist Marin Komadina