469,602 Members | 2,108 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,602 developers. It's quick & easy.

Sample script for backups using DB2 v8 on Windows and TSM

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
Nov 12 '05 #1
1 4863
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
***********************************************
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by greggarpin | last post: by
5 posts views Thread by Paul O. Morris | last post: by
4 posts views Thread by Myth of Sisyphus\). | last post: by
reply views Thread by Arni Snorri Eggertsson | last post: by
18 posts views Thread by rdemyan via AccessMonster.com | last post: by
2 posts views Thread by m19peters | last post: by
3 posts views Thread by David | last post: by
15 posts views Thread by Chris Jones | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.