473,756 Members | 1,676 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HADR - recovery

I have two questions about HADR recovery. I am running db2 v8 fp12.

1) If the primary suddenly crashes would you always want to switch the
standby to the primary by force...or would there be times when you
would want to make it a standard? (and why)

2) Let us say the primary suddenly crashes (someone pulled the power
cable) and you switch the standby to primary by force. Then you bring
the primary back up and issue a START as STANDBY. If you are in
near-sync mode, wouldnt there be a good chance the two databases could
be out of sync? For instance, the old primary sent logs data to the
standby and crashed prior to the COMMIT. That transaction would be on
the Standby as completed but not on the old primary. So the question
is...does this old primary need to have a db restore done? I noticed
an old discussion on HADR that seemed to imply you could just bring
this old primary up as standby now and it will automagically recover.
Can anyone briefly (but indepthly) discribe how you typically verify db
integrity and recovery actions.

Thanks!

Dec 4 '06 #1
6 3458
"shorti" <lb******@juno. comwrote in message
news:11******** **************@ 80g2000cwy.goog legroups.com...
>I have two questions about HADR recovery. I am running db2 v8 fp12.

1) If the primary suddenly crashes would you always want to switch the
standby to the primary by force...or would there be times when you
would want to make it a standard? (and why)
1. It is always preferable to do a regular takeover (without force) if that
will work. However, if the primary server goes down and the two servers are
in "disconnect ed" state, then you must do a takeover by force for it take
affect.
2) Let us say the primary suddenly crashes (someone pulled the power
cable) and you switch the standby to primary by force. Then you bring
the primary back up and issue a START as STANDBY. If you are in
near-sync mode, wouldnt there be a good chance the two databases could
be out of sync? For instance, the old primary sent logs data to the
standby and crashed prior to the COMMIT. That transaction would be on
the Standby as completed but not on the old primary. So the question
is...does this old primary need to have a db restore done? I noticed
an old discussion on HADR that seemed to imply you could just bring
this old primary up as standby now and it will automagically recover.
Can anyone briefly (but indepthly) discribe how you typically verify db
integrity and recovery actions.

Thanks!
2. I am not sure about this one, so someone else can answer.
Dec 5 '06 #2
will work. However, if the primary server goes down and the two servers are
in "disconnect ed" state, then you must do a takeover by force for it take
affect.
You said "MUST do a takeover by force". Does this mean you cannot stop
hadr on the
Standby and have it run as a standard? Or does this mean you would
never want to
stop hadr and have it run as a standard?

This is actually a third question but related to this one...If it is
the Standby that crashed
it is my understanding that the Primary would receive an sql error when
it times out
trying to communicate with the Standby that is no longer there. When
this occurs do
you want to issue a PRIMARY BY FORCE or do you stop HADR and let this
side run
as a STANDARD?

The reason these scenarios are not clear is because I was reviewing the
recommended
procedure to do a rolling upgrade and it shows the Primary being
changed from ACTIVE
PRIMARY to ACTIVE STANDARD, then the ACTIVE STANDBY changed to INACTIVE
STANDBY then finally INACTIVE STANDARD. I was curious if it is common
to move
to a non-HADR mode.

Dec 5 '06 #3
"shorti" <lb******@juno. comwrote in message
news:11******** **************@ n67g2000cwd.goo glegroups.com.. .
You said "MUST do a takeover by force". Does this mean you cannot stop
hadr on the
Standby and have it run as a standard? Or does this mean you would
never want to
stop hadr and have it run as a standard?
To be honest, I am not sure because I can't imagine why you want to do that.
Just issue the takeover by force.

If you stop hadr on standby (without a takeover to primary), the standby
database (even if hadr is stopped) might still be in rollforward pending
state (but not 100% sure about this).
>
This is actually a third question but related to this one...If it is
the Standby that crashed
it is my understanding that the Primary would receive an sql error when
it times out
trying to communicate with the Standby that is no longer there. When
this occurs do
you want to issue a PRIMARY BY FORCE or do you stop HADR and let this
side run
as a STANDARD?
If the standby crashes, the servers are in disconnected state, and the
primary is still hadr primary (you don't need to do anything). Applications
do not get any SQL errors, and you just keep on going.
>
The reason these scenarios are not clear is because I was reviewing the
recommended
procedure to do a rolling upgrade and it shows the Primary being
changed from ACTIVE
PRIMARY to ACTIVE STANDARD, then the ACTIVE STANDBY changed to INACTIVE
STANDBY then finally INACTIVE STANDARD. I was curious if it is common
to move
to a non-HADR mode.
I have not tried the approach recommended above. Occasionally, I have done
"db2stop force" on the standby, then made changes to standby, then db2start,
then activate database, and then let it catch up with primary (assuming that
the catch up info is still available in the logs on the primary).

At any rate, the procedures for a rolling upgrade are not the same as for a
crash. If the standby crashes, you don't need to do anything until you try
and bring the standby back on-line in peer state.
Dec 5 '06 #4
1) If the primary suddenly crashes would you always want to switch the
standby to the primary by force...or would there be times when you
would want to make it a standard? (and why)
Well...what is the goal you're trying to achieve?

Expected response in an HADR environment is to failover (take over by
force on standby). Another possibly sensible response under some
circumstances would be to simply repair/restart the primary in-place,
i.e., normal recovery w/o performing failover.

Presumably the "it" to which you refer is the existing standby, and I'm
not able to quickly imagine a case where one would prefer to convert
the standby to standard (i.e., issue stop hadr) in response to failure
of the primary. A cleaner approach if you have some reason to seek
that end would be to issue takeover by force followed by stop hadr. As
long as the original primary hasn't rejoined the pair in the meanwhile,
this would have the same logical result but the takeover provides a
cleaner way to finish the "rollforwar d" activity of the standby. If
you issue the stop hadr first, you'll anyway need to issue a
rollforward..an d stop command to bring the ex-standby out of
rollforward mode.

2) Let us say the primary suddenly crashes (someone pulled the power
cable) and you switch the standby to primary by force. Then you bring
the primary back up and issue a START as STANDBY. If you are in
near-sync mode, wouldnt there be a good chance the two databases could
be out of sync?
No, shouldn't be. If the primary was in Peer state and operating under
NEARSYNC mode when it failed, then the only way there could be loss of
consistency would be if the standby suffered a concurrent failure and
lost some log data that was in the standby's memory but not yet written
to the standby's log file on disk.

For instance, the old primary sent logs data to the
standby and crashed prior to the COMMIT. That transaction would be on
the Standby as completed but not on the old primary.
Nope. If the commit didn't make it to the standby, then the standby
would roll back the transaction on takeover.

So the question
is...does this old primary need to have a db restore done? I noticed
an old discussion on HADR that seemed to imply you could just bring
this old primary up as standby now and it will automagically recover.
Yes, with the caveats described above -- primary crashed in peer state,
standby didn't also fail concurrently. Btw, the latter is a NEARSYNC
requirement; in SYNC mode, the standby can also have failed.

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

Dec 14 '06 #5
The reason these scenarios are not clear is because I was reviewing the
recommended
procedure to do a rolling upgrade and it shows the Primary being
changed from ACTIVE
PRIMARY to ACTIVE STANDARD, then the ACTIVE STANDBY changed to INACTIVE
STANDBY then finally INACTIVE STANDARD. I was curious if it is common
to move
to a non-HADR mode.
We generally only recommend using STOP HADR when one no longer wants
the current incarnation of HADR. I don't believe our rolling upgrade
procedure recommends that and I'm curious what you're looking at.
Here's an example pointer to rolling upgrade in our docs:

http://publib.boulder.ibm.com/infoce...c/t0011766.htm

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

Dec 14 '06 #6
So the question
is...does this old primary need to have a db restore done? I noticed
an old discussion on HADR that seemed to imply you could just bring
this old primary up as standby now and it will automagically recover.

Yes, with the caveats described above -- primary crashed in peer state,
standby didn't also fail concurrently. Btw, the latter is a NEARSYNC
requirement; in SYNC mode, the standby can also have failed.
Uh, to clarify, my "yes" is an affirmation of the discussion implying
that the old primary could be reintegrated as new standby by issuing
"start hadr .. as standby" and would automatically resynchronize. That
is, under the described conditions, a restore would *not* be required.

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

Dec 14 '06 #7

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

Similar topics

1
3104
by: Bruce M | last post by:
Is there a way to run the db2-generated HADR-create script outside of DB2CC beyond the obvious? My DB2CC generates the HADR script and then abends because of a java error meaning I can't finish my HADR creation. In looking at the script it isn't necessarily obvious which commands should run on the primary server and which should be run on the standby server.
4
3725
by: db2group88 | last post by:
we are using db2 udb v8.2 on windows. all our tables are created with not logged initially property, So if i want to activate HADR (high availability disaster recovery) for the database, in the document it said " non-replicated operations include, but are not limited to --Tables created with the NOT LOGGED initially option specified", so does that means i can't do HADR on our current database because all the tables are created with the...
1
4059
by: bwmiller16 | last post by:
Folks - Linux RH3, UDB 8.2 FP9. I've got two tiny test boxes that I'm setting up to get a simple HADR configuration built. When I start the primary I get the famous SQL1768 RC=7 and also this on the db2diag.log. This looks to me to be more than a simple firewall issue (which I've checked).
13
5066
by: m0002a | last post by:
I am trying to determine whether LOB's are replciated using HADR. The following documentation from the on-line manuals http://publib.boulder.ibm.com/infocenter/db2help/index.jsp suggest that LOB's are not replicated on HADR: ------------------------------------------------ "Non-replicated operations for high availability disaster recovery: High availability disaster recovery (HADR) uses database logs to replicate data to the standby...
6
5251
by: m0002a | last post by:
I have sucessfully set up an HADR pair of databases. Everthing works fine for the primary and secondary HADR databases, and manual takeover works fine. When I try to set up the second pair of databases for HADR in the same instance, I get the following error message (I already sucessfully started the standby database): $ db2 start hadr on db tdsapp as primary SQL1768N Unable to start HADR. Reason code = "99".
16
21798
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
23475
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
6
21960
by: shorti | last post by:
db2 8.1 fix pack 12 on AIX 5.3 This is a newly configured HADR machine. The HADR was up and running. I was 'playing' around some on the standby and did a db2 deactivate and things sort of went down hill from there. Though the Standby machine seemed to know it was a standby it would not connect to the primary. I could not even do a db2 get snapshot to view the hadr status on the machine. I was wanting to do a few HADR tests before I...
1
3146
by: agentlease | last post by:
Hi, Testing the above without TSA or HA, just plain HADR performing manual db2 TAKEOVER HADR ......................... etc. I am testing without the PEER_WINDOW i.e. set to 0 and HADR_SYNCMODE = SYNC. A quick question, say the primary and standby database servers are in PEER state and the primary database server suddenly crashes through a
0
9869
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
9838
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
9708
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7242
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
6534
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
5302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3805
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3354
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2665
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.