HDR secondary database
Posted in 2008
Sunita asked whether, before rebooting the box hosting an HDR secondary, it was safe to switch the secondary to standard mode with 'onmode -d standard' and later set it back to secondary. Respondents (Paul Mosser, Madison Pruet, Nilesh Ozarkar, Marcus Haarmann) said no: switching modes breaks the pair and forces rebuilding HDR from a restore. Just shut the secondary down, reboot, and bring it back online; the primary resends logical logs and resyncs ('Primary/Secondary server operational'). If the outage is long and logs wrap, restore the missing logical logs on the secondary (ontape -l) rather than starting over. Her observed automatic mode switch when bouncing the primary was attributed to the DRAUTO onconfig setting (set 0 to disable).
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: High Availability & Replication, Server Administration
Hi,
We are required to reboot our database server where HDR's secondary instance
resides. If I bring that offline what happens to all the replication logs that
get queued up on primary side plus the error messages. Is it safe to turn
secondary to standard mode 'onmode -d standard' before bringing offline and
when database server is rebooted, I can bring the secondary instance online
and turn it back to 'onmode -d secondary <primary dbserver name>'. I hope it
catches back the replication from primary. Please let me know asap if this
will work.
In this process we are not touching primary database at all.
Thanks,
Sunita
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On
> Behalf Of SUNITA RAINA
> Sent: Friday, February 29, 2008 11:02 AM
> To: ids@iiug.org
> Subject: HDR secondary database [11464]
>
> Hi,
>
> We are required to reboot our database server where HDR's
> secondary instance
> resides. If I bring that offline what happens to all the
> replication logs that
> get queued up on primary side plus the error messages. Is it
> safe to turn
> secondary to standard mode 'onmode -d standard' before
> bringing offline and
> when database server is rebooted, I can bring the secondary
> instance online
> and turn it back to 'onmode -d secondary <primary dbserver
> name>'. I hope it
> catches back the replication from primary. Please let me know
> asap if this
> will work.
> In this process we are not touching primary database at all.
>
> Thanks,
> Sunita
>
Sunita,
Do *NOT* change the secondary server to standard mode!! If you do that,
then you will have to start replication from scratch all over again with
a physical restore, etc. If your outage is going to be fairly short,
then just shut down the secondary instance, bounce the box, and then
bring the secondary instance back up. When the primary re-connects with
the secondary, it will "catch up" by sending logical log records over to
the secondary. When you see the message "Primary (Secondary) server
operational" in the message log, that tells you that they have
re-sync'ed.
However, if your secondary instance / box is going to be down for quite
a while (i.e., several days), then you probably *should* go ahead and
start HDR all over again from scratch after the secondary box is back up
and running again.
HTH,
Paul M.
ids-bounces@iiug.org wrote on 02/29/2008 12:41:13 PM:
> > -----Original Message-----
> > From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On
> > Behalf Of SUNITA RAINA
> > Sent: Friday, February 29, 2008 11:02 AM
> > To: ids@iiug.org
> > Subject: HDR secondary database [11464]
> >
> > Hi,
> >
> > We are required to reboot our database server where HDR's
> > secondary instance
> > resides. If I bring that offline what happens to all the
> > replication logs that
> > get queued up on primary side plus the error messages. Is it
> > safe to turn
> > secondary to standard mode 'onmode -d standard' before
> > bringing offline and
> > when database server is rebooted, I can bring the secondary
> > instance online
> > and turn it back to 'onmode -d secondary <primary dbserver
> > name>'. I hope it
> > catches back the replication from primary. Please let me know
> > asap if this
> > will work.
> > In this process we are not touching primary database at all.
> >
> > Thanks,
> > Sunita
> >
>
> Sunita,
>
> Do *NOT* change the secondary server to standard mode!! If you do that,
> then you will have to start replication from scratch all over again with
> a physical restore, etc. If your outage is going to be fairly short,
> then just shut down the secondary instance, bounce the box, and then
> bring the secondary instance back up. When the primary re-connects with
> the secondary, it will "catch up" by sending logical log records over to
> the secondary. When you see the message "Primary (Secondary) server
> operational" in the message log, that tells you that they have
> re-sync'ed.
>
> However, if your secondary instance / box is going to be down for quite
> a while (i.e., several days), then you probably *should* go ahead and
> start HDR all over again from scratch after the secondary box is back up
> and running again.
When you restart HDR secondary instance after the extended down time,
you don't really have to setup HDR secondary from scratch.
What you could do is, start the secondary instance, when you see
following message in server log.
"DR: Start failure recovery from tape ..."
perform the logical log restore from the logs backup done at primary.
Once, all the logs are restores, secondary will get in sync with primary.
HTH,
Nilesh
>
> HTH,
> Paul M.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
> See you at the IIUG Informix 2008 Conference
> The Power Conference for Informix Professionals
> April 27 - 30, 2008 Marriott Overland Park (Kansas City), Kansas
> http://www.iiug.org/conf
> Registration Now Open!!
No..
You should only switch a member of the HDR pair into standard mode if y=
ou
are wanting to split the pair into two independent stand alone servers.=
You should just bring the secondary offline and then bring it back onli=
ne
when you are able to bring the machine back up.
You probably want to make sure first that you have enough logs on the
primary/secondary so that you can avoid a log-wrap during the time peri=
od
that the secondary is down. Otherwise you will have to either restore =
from
the archived logs, or restart HDR from scratch.
-------------------------------------
Madison Pruet, STSM
IDS Replication Architect
=
"SUNITA RAINA" =
<sraina@idoc.idah =
o.gov> =
To
Sent by: ids@iiug.org =
ids-bounces@iiug. =
cc
org =
Subj=
ect
HDR secondary database [11464] =
02/29/2008 12:01 =
PM =
=
=
Please respond to =
ids@iiug.org =
=
=
Hi,
We are required to reboot our database server where HDR's secondary
instance
resides. If I bring that offline what happens to all the replication lo=
gs
that
get queued up on primary side plus the error messages. Is it safe to tu=
rn
secondary to standard mode 'onmode -d standard' before bringing offline=
and
when database server is rebooted, I can bring the secondary instance on=
line
and turn it back to 'onmode -d secondary <primary dbserver name>'. I ho=
pe
it
catches back the replication from primary. Please let me know asap if t=
his
will work.
In this process we are not touching primary database at all.
Thanks,
Sunita
***********************************************************************=
********
Forum Note: Use "Reply" to post a response in the discussion forum.
See you at the IIUG Informix 2008 Conference
The Power Conference for Informix Professionals
April 27 - 30, 2008 Marriott Overland Park (Kansas City), Kansas
http://www.iiug.org/conf
Registration Now Open!!
=
Hi,
You can safely shutdown the secondary and reboot the machine. Do not use
the onmode command to change the state to standard. The HDR is being
reestablished when the instance comes up again.
The primary will then send the logfiles from in between to the secondary
to synchronize again.
Once synchronized, HDR continues to work in the normal way by exchanging
the transaction data.
The problem could only be that your outage takes too long so that the
primary instance does not have all the logfiles needed on disk (because
these are rotated in the meantime). In this case, you have to restore
the missing logfiles from disk/tape on the secondary instance by using
ontape -l. This will load the missing logfiles. You have to do thisuntil your reach any logfile which is on disk of the primary so the hdr
can send this directly. Do not touch the onmode -d at any time, because
in that case you will lose the state of the secondary and you would have
to restore a complete archive.
Marcus
-----Original Message-----
From: SUNITA RAINA [mailto:sraina@idoc.idaho.gov]
Sent: Friday, February 29, 2008 7:02 PM
To: ids@iiug.org
Subject: HDR secondary database [11464]
Hi,
We are required to reboot our database server where HDR's secondary
instance resides. If I bring that offline what happens to all the
replication logs that get queued up on primary side plus the error
messages. Is it safe to turn secondary to standard mode 'onmode -d
standard' before bringing offline and when database server is rebooted,
I can bring the secondary instance online and turn it back to 'onmode -d
secondary <primary dbserver name>'. I hope it catches back the
replication from primary. Please let me know asap if this will work.
In this process we are not touching primary database at all.
Thanks,
Sunita
************************************************************************
*******
Forum Note: Use "Reply" to post a response in the discussion forum.
See you at the IIUG Informix 2008 Conference
The Power Conference for Informix Professionals
April 27 - 30, 2008 Marriott Overland Park (Kansas City), Kansas
http://www.iiug.org/conf
Registration Now Open!!
Hi,
you can control the behaviour with the DRAUTO setting in onconfig.
Setting it to 0 will not move the secondary to primary or standard in case the
primary fails.
It depends on your intended environment whether bouncing the primary should
switch the secondary. I think 1 switches to standard and 2 to primary, but I
am not sure since which version this setting is active.
Marcus
----- Originalnachricht -----
Von: sraina@idoc.idaho.gov
Gesendet: Fre, 29.2.2008 22:40
An: Sunita Raina <sraina@idoc.idaho.gov>
Betreff: RE: HDR secondary database [11468]
Thank you so much for your responses. As you can tell we have a new
replication environment over here. The reason I thought I can set it to
standard was that last time we had to bounce primary database on HDR pair,
when it came back up I noticed secondary database had gone disconnected from
replication and it was changed to secondary on its own just be bouncing the
primary. Immediately I changed the mode on secondary by doing 'onmode -d
secondary <primary db server name>'. It started working fine. Hence this time
I had to bounce secondary so I thought of turning it to standard. I will be
careful not to do that.
So bottom line is anytime we need to bounce primary or secondary, we can do it
without changing replication mode. My concern is however that when i bounce
primary, that changes secondary to standard. That happend once....don't know
if future.
Thanks a bunch,
Sunita Raina