473,320 Members | 2,164 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 5011
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: greggarpin | last post by:
Hi All. I'm currently maintaining 4 servers - 1 for public/customers and 3 for backups, development, etc... I regularly backup the entire SQL database for our public server and restore it on...
5
by: Paul O. Morris | last post by:
Is there a script that I can run to stop a particular SQL server service on Win2003 server? I'm looking for a similar script to restart that service as well. Thanks.
4
by: Myth of Sisyphus\). | last post by:
I wish to run this script daily. Can this be scheduled? backup log shipmateDB with truncate_only G
0
by: Arni Snorri Eggertsson | last post by:
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...
18
by: rdemyan via AccessMonster.com | last post by:
Here's my plan for creating nightly backups of the production back-end file (the IT staff in their infinite wisdom have prevented use of Windows Scheduler and users do not have administrative...
11
by: RoB | last post by:
Hi all, I'm coming from the Informix world and I have a customer using DB2 8.2.3 for Linux on Red Hat Enterprise ES. The customer is performing filesystem backups of the containers etc every...
2
by: m19peters | last post by:
We have a script that I had to rework a little bit for 2005 that does a full backup for every database on the server... For some reason on some nights the script does not backup all databases......
3
by: David | last post by:
On Sun, May 4, 2008 at 4:43 AM, lev <levlozhkin@gmail.comwrote: Hi, I started tidying up the script a bit, but there are some parts I don't understand or look buggy. So I'm forwarding you the...
15
by: Chris Jones | last post by:
I wrote a trivial backup script that does the following: If tonight is the first day of the month: save last month's archive do a full backup of the system else: save last night's...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.