Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / May 2007

Tip: Looking for answers? Try searching our database.

How to remove transaction logs in HADR?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Laurence - 20 Apr 2007 15:37 GMT
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
Laurence - 23 Apr 2007 02:45 GMT
> Hi folks,
>
[quoted text clipped - 11 lines]
>
> 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
Mark A - 23 Apr 2007 04:15 GMT
> > Hi folks,
>
[quoted text clipped - 20 lines]
>
> Laurence

You will have to write a script to delete them.
Steve Pearson (news only) - 03 May 2007 19:49 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.