Oh, just note, while an HDR does not need this, RSS secondaries must have LOG_INDEX_BUILDS set, so you may have to set that before changing the secondary's mode:
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
Original Message:
Sent: Mon November 20, 2023 09:45 AM
From: Art Kagel
Subject: Manual PRI and RSS switch-over
Dennis:
I'm confused. I thought you were trying to swap roles between your primary and an RSS secondary?
As for how to convert an HDR secondary to an RSS secondary, you just have to run:
On the primary:
onmode -d add RSS <secondary>
On the HDR secondary:
onmode -d RSS <primary>
If you will not need any HDR secondaries running, you can convert the primary to a standalone server (RSS does not need its "primary" to be in "primary mode":
on the primary:
onmode -d standard
Art
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
Original Message:
Sent: Mon November 20, 2023 09:40 AM
From: Dennis Melnikov
Subject: Manual PRI and RSS switch-over
Art,
What is a less risky way to convert an HDR secondary to a RSS?
------------------------------
Sincerely,
Dennis
Original Message:
Sent: Fri November 10, 2023 11:13 AM
From: Art Kagel
Subject: Manual PRI and RSS switch-over
Dennis:
OK, so, in reality an RSS secondary does nit need a primary but can work with a standalone as its "primary". So you could convert the RSS to a standalone to master the other server. The problem is that the current primary is either in primary mode or standalone mode and my not sync to the former RSS
You can try it does not always work which is why i recommended converting to HDR first.If it fails you will have to restore or ifxclone from the former RSS to recreate the new RSS. Here are the steps:
- on the primary: onmode -ky
- on the RSS: onmode - d standalone
- on the original primary: oninit -PHY
- then: onmode -d RSS other's_name
- on the former RSS: onmode -d add RSS old_prime_name
Art
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
Original Message:
Sent: Fri November 10, 2023 09:48 AM
From: Dennis Melnikov
Subject: Manual PRI and RSS switch-over
Art:
Please, is it a correct sequence for the first step, to promote the RSS to HDR secondary?
PRI> onmode -u
RSS> onmode -ky
RSS> oninit -PHY
PRI> onmode -d primary RSS
RSS> onmode -d secondary PRI
------------------------------
Sincerely,
Dennis
Original Message:
Sent: Fri November 10, 2023 06:24 AM
From: Art Kagel
Subject: Manual PRI and RSS switch-over
Dennis:
The first step is to promote the RSS to HDR because an RSS cannot directly become a primary. Once that's done, there are two scripts in $INFORMIXDIR/bin that are used to swap roles. Once the original primary has been made the HDR secondary you can change it do RSS. The two scripts are:
/opt/informix/infmx/bin/hdrmkpri.sh -- This is run on the HDR secondary to make it the new primary
/opt/informix/infmx/bin/hdrmksec.sh -- This is run on the original primary to make it the new HDR secondary
Running them tells you what to do:
$ /opt/informix/infmx/bin/hdrmkpri.sh
This script changes the type of the Data replication server to Primary.
Steps to switch server types in an HDR pair:
Instance A (currently Primary) Instance B (currently Secondary)
------------------------------ --------------------------------
1] onmode -ky (server should be up)
2] hdrmkpri.sh <primary_server_name>
3] hdrmksec.sh <secondary_server_name>
(now a Secondary server) 4] oninit (now a Primary server)
WARNING: Please ensure the following before proceeding further:
1] the paired database server is OFFLINE,
2] the current database server is up, and
3] the current database server has Data replication turned off.
Not doing so, shall make the two database servers in the
Data replication pair out-of-sync, and shall require
re-establishing the pair.
Press return to continue...
The note about "Data replication" is referring to ER.
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
Original Message:
Sent: Fri November 10, 2023 04:41 AM
From: Dennis Melnikov
Subject: Manual PRI and RSS switch-over
Hi,
We have two servers setup, PRI and RSS.
How to switch their roles? I suspect the Admin Guide omits some significant steps.
------------------------------
Sincerely,
Dennis
------------------------------