473,413 Members | 2,043 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,413 software developers and data experts.

How to remove transaction logs in HADR?

Hi folks,

How to remove the transaction logs which are out of date in HADR
environment?

DB2 command PRUNE, it can only run on primary database but cannot run
on standby database. Because the database conection is not permitted
on standby database.

USEREXIT, I don't know whether it can run on standby database or
not...

Any comments?
Laurence

Apr 20 '07 #1
3 6240
On 4月20日, 下午10時37分, Laurence <worldwide...@gmail.comwrote:
Hi folks,

How to remove the transaction logs which are out of date in HADR
environment?

DB2 command PRUNE, it can only run on primary database but cannot run
on standby database. Because the database conection is not permitted
on standby database.

USEREXIT, I don't know whether it can run on standby database or
not...

Any comments?

Laurence
Hmm, I mean the archived logs but not transaction logs. Sorry~

How to remove/clear archived logs between primary/standby databases in
HADR environment? Have any comments?
Thanks in advance,

Laurence

Apr 23 '07 #2
On Apr 22, 9:45*pm, Laurence <worldwide...@gmail.comwrote:
On 420, 銝1037, Laurence <worldwide...@gmail.comwrote:
Hi folks,
How to remove the transaction logs which are out of date in HADR
environment?
DB2 command PRUNE, it can only run on primary database but cannot run
on standby database. Because the database conection is not permitted
on standby database.
USEREXIT, I don't know whether it can run on standby database or
not...
Any comments?
Laurence

Hmm, I mean the archived logs but not transaction logs. Sorry~

How to remove/clear archived logs between primary/standby databases in
HADR environment? Have any comments?

Thanks in advance,

Laurence
You will have to write a script to delete them.

Apr 23 '07 #3
Ideally HADR should manage the set of log files automatically on the
standby, deleting or recycling (rename old and use as container for a
new one) them as needed. It is intended to do this, but there are a
couple of known issues that may play in, causing accumulation of more
log files than desirable on the standby.

- APAR IY85138 - fixed in V8 FP14 and V9 FP2 - "First active log file"
not updated frequently enough on standby, causing retention/
accumulation of potentially many more log files than needed.

- APAR IY94994/APAR JR25834 - open - Log files are never deleted on
HADR standby, only recycled. This results in the number of log files
retained on the standby only growing, never shrinking.

It is generally* safe to delete log files from the HADR standby that
have (a) already been archived (at primary), and (b) have a sequence
number lower than that of the first active log file. DB2 itself will
normally consider such log files for removal (subject to implications
of config param LOGPRIMARY).

*- The risk involved in removing such log files is that they may be
required later in case of a rollforward operation or reinitialization
of the HADR standby. In an HADR environment, log file archives made
at one site in an HADR pair must anyway be later accessible to the
other site for these purposes, so this is not a new requirement of
this particular scenario.

One can determine the first active log file at the standby from the
output of "GET DB CFG" issued there, for example:
db2 get db cfg for <dbname-or-alias| grep "First active"

Regards,
- Steve P.
--
Steve Pearson, DB2 for Linux, UNIX, and Windows, IBM Software Group
"Portland" Development Team, IBM Beaverton Lab, Beaverton, OR, USA

May 3 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: enigma | last post by:
Just wondering if you could help me on this one. I'm not sure if my transaction logs are behaving oddly or what. I've successfuly managed to shrink my transaction logs from 7GB down to 1MB and now...
0
by: xo55ox | last post by:
Hi, I have been trying to set up an automated restore process from prod to backup server. First, I schedule the full database backup nightly, transfer the backup file and restore it to the...
14
by: RdR | last post by:
Would anyone know if DDL changes such as creating a table, altering a table, dropping the table, dropping a tablespace be in the DB2 logs? I am writing a log capture program so that I can replicate...
16
by: gumby | last post by:
I'm having trouble getting HADR to work with the sample databases on two HS20 xSeries blades, Red Hat ES4 up3, DB2 8.2.4, getting the following error. SQL1768N Unable to start HADR. Reason code...
8
by: Challenge | last post by:
Hi, I got error, SQL1768N Unable to start HADR. Reason code = "7", when I tried to start hadr primary database. Here are the hadr configuration of my primary db: HADR database role ...
2
by: francois1 | last post by:
I am running a website with a SQL Server database attached. My transaction logs are full and my hosting co. won't allocate more disk space for me. I need to delete my database transaction logs...
3
by: TG | last post by:
Coming from a (mostly) Oracle shop, I am unclear how SS transaction logs work as far as up to point of failure recovery goes. I have the few MSSQL databases I look after in full recovery mode,...
1
by: JA | last post by:
Hi, I know just about nothing about SQL Server. I am getting this error: The log file for database 'my_database' is full. Back up the transaction log for the database to free up some log space. ...
4
by: madzambonis | last post by:
Here is the situation.... We have Primary Server A linked to Standby Server B via HADR. Primary Server A has recently installed LOGARCHMETH1 to archive logs and a 2nd homegrown script that...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.