Arni Snorri Eggertsson wrote:
Hi there
I was hoping to save some time and check if anyone would share their
script to automate online backups using DB2 v8 on Windows and backing
up to TSM. The part I am specially looking for is the automatic LOG
cleaning.
thanks in advance!
best regards
Arni
arnie - at - gormur.com
Hmm, I'm never working on a Windows platform. However I would
guess that is should be the same as on Unix.
What you need is the sample userexit program that is delivered with
DB2. This program could be found at (you need to translate the path
information to NT):
<INSTANCEHOME>/sqllib/samples/c/db2uext2.ctsm
You only need to change some #define's at the beginning of the
program and then you should be able to compile it.
After that you put the compiled executable to the following location:
<INSTANCEHOME>/sqllib/adm/db2uext2
You might need to name the executable 'db2uext2.exe' on NT, I'm not
sure.
After that you should be able to archive logs to TSM.
You can check if it works by manually forcing a log switch:
db2 'archive log for db <dbname>'
The userexit also creates some trace files (ARCHIVE.LOG,
USEREXIT.ERR, RETRIEVE.LOG) which you might check for
any errors or warnings.
You should not delete any logs in the userexit program itself.
The userexit is only responsible for transferring the log from
the active log path to another location like TSM. The userexit
is invoked from the DB2 databaseserver when a log switch occurs.
However there might be still open transactions in the log file
just archived by the userexit program, so the DB2 databaseserver
will delete the log as soon as it is no longer needed for crash
recovery or the rollback of ongoing transactions.
HTH.
Best regards
Eric
--
IT-Consulting Herber
***********************************************
Download the IFMX Database-Monitor for free at:
http://www.herber-consulting.de/BusyBee
***********************************************