473,657 Members | 2,654 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6275
On 4月20日, 下午10時37分, Laurence <worldwide...@g mail.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...@g mail.comwrote:
On 420, 銝1037 , Laurence <worldwide...@g mail.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 reinitializatio n
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
3873
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 I find it strange that the log file doesn't seem to increase its size. The timestamp of the logfile is updating as well. But the size of the file is constant. I haven't configured my database to do auto-shrink so Im really confused why it hasn't...
0
2076
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 database on the backup server. Meanwhile, I leave the database ready to accept transaction log from the transaction log backup at noon daily. And I had used different restore options to test out the transaction that was being applied. And I couldn't...
14
7577
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 changes on my source DB2 by getting change data information , get this information, convert it to a SQL command, send it to another DB2 instance and run it there, in effect replicating the DDL change. I am already able to do this with DML....
16
21761
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 = "7" - The primary database failed to establish a connection to its standby database within the HADR timeout interval. What things should I check besides the remote host and remote service parameters on the standby database, which seem to be...
8
23426
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 = STANDARD HADR local host name (HADR_LOCAL_HOST) = testserver HADR local service name (HADR_LOCAL_SVC) = 56000 HADR remote host name (HADR_REMOTE_HOST) = testserver
2
3232
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 and asume I will need to run an SQL script to do this. Problem: I do not have MS Enterprise Manager of any database utility on my website apart from MS Access. Where can I download a free SQL tool that I can use to delete the transaction logs...
3
1617
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, and I set up maintenance plans to back these up online on a daily basis. In the research I did it was recommended backing up the transaction logs as well on a frequent basis to ensure recovery to POF or point in time. I had assumed that they work...
1
2490
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. I can't access the transaction logs to back them up. I am told that my ISP's tech support should have it set up to shrink those logs automatically every so often. Is that true?
4
5505
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 compresses the archived logs once in the archive log directory. Standby Server B has our old script that moves logs from active to archive directories and then compresses them every 30 minutes.
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7327
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6164
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4152
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4304
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1615
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.