Wednesday, November 14, 2007

Setting up SQL Server backups with Tivoli TDP agent

INSTALLATION

For SQL Server 2000 => TDPSQL 5.2.1 agent
For SQL Server 2005 => TDPSQL 5.2.1 + patch 3
Patch 3 is required to avoid ACO5423E error

For 2000 file, you will need to extract it manually onto c:\TEMP, then find the appropriate SETUP.exe, run it and follow the instructions. For 2005 file, it will do that automatically.

PDF file in the same directory contains all further details about the installation and configuration.

CONFIGURATION

Ask Tivoli administrator to register TDP for SQL as a client node within the TSM server.
Set up the option and configuration file

TESTING
tdpsqlc query TSM
If this command fails, then connection to the Tivoli Manager is not set up properly.
tdpsqlc query TDP
This command just checks whether your configuration file is set properly.
tdpsqlc query SQL *
The agent will try to connect to the databases.

RUNNING THE BACKUP
TDPSQLC Backup *|dbname[,dbname,...] [Full/Difffull/Log]
/DIFFESTimate=10 -- to estimate the size of changed blocks to 10 percent
/BUFFers=128 -- this will put the size of buffer to 128Kb. The buffer is used to transfer the data between TDP and TSM

We have been running a differential backup on 50G database. It takes two minutes to finish it as most of our data are static. The full backup takes 1 hour.

EXCLUDING THE DATABASE FROM THE BACKUP

To exclude the database from the Tivoli backup, for example you can add this command to your option file:
EXCLUDE.BACKUP "\...\DBEMPL\...\*"

If you want to exclude just for certain backups, create a separate option file, for example opt_small_databases_bakup.opt
and then run your backup command:
"C:\Program Files\Tivoli\TSM\TDPSql\tdpsqlc" backup * full /TSMOPTFile="C:\Program Files\Tivoli\TSM\TDPSql\dsm_small_databases_bakup.opt"

This will backup up all database except for DBEMPL.

SCHEDULING THE BACKUP
It can be done either via TSM or as a SQL Server job

RESTORE
TDPSQLC Restore *|dbname[,dbname,...] [Full/Difffull]|[FIle/Log=*|logicalname[,logicalname,...]] [parameters]
The relevant parameters are
For the restore:
/DBOonly - prevents general users from accessing a restored database.
/STOPAT - restores a SQL database to a specified point in time.

DOCUMENTATION
http://publib.boulder.ibm.com/infocenter/tivihelp/v1r1/index.jsp?topic=/com.ibm.itsmfd.doc/ab5m000171.htm