Informix

 View Only
  • 1.  Swapping Primary and RSS roles in HDR Replication Without A Backup/Restore

    Posted Fri November 11, 2022 11:48 AM

    Hello everyone,

     

    I have not had to swap primary and RSS secondary roles in a while (years) and I have never used the "oninit -PHY" option.

     

    Whenever I swapped the roles of such servers in the past, I always went through the usual synching involving a level zero backup and restore.

     

    My question is:  can I swap the roles of a primary and an RSS using simply the onmode/oninit (PHY) etc. commands and without a level zero backup/restore these days (version 12.10)?   Are there ifs and buts and conditions where one can only do this under certain scenarios?  Again, it is not an HDR secondary but an RSS secondary I am talking about here.

     

    Thank you,

     

    Hal

     

    Hal Maner

    M Systems International, Inc.

     


    #Informix


  • 2.  RE: Swapping Primary and RSS roles in HDR Replication Without A Backup/Restore

    IBM Champion
    Posted Fri November 11, 2022 12:08 PM
    Hi Hal,

    Yes, you can switch the roles without a backup/restore.

    You will need to make your RSS an HDR before doing the switch.

    If you already have an HDR, then you will need to make this an RSS first:

    On Primary: onmode -d add RSS <hdr instance>
    On HDR: onmode -d RSS <primary instance>

    You'll then have a Primary and 1 or more RSS.

    Then make your RSS (that you want to become the primary) an HDR:

    On RSS: onmode -d secondary <primary instance>
    On Primary: onmode -d delete RSS <rss instance>

    Once you have the RSS changed to the HDR then you can do the switch.

    You can run the individual commands (which includes oninit-PHY), or just use the supplied scripts to perform the operation:

    On Primary:  onmode -kuy
    On HDR: hdrmkpri.sh <original primary instance>
    On original Primary: hdrmksec.sh <hdr instance>
    On HDR (now new primary): oninit -v




    ------------------------------
    Mike Walker
    xDB Systems, Inc
    www.xdbsystems.com
    ------------------------------



  • 3.  RE: Swapping Primary and RSS roles in HDR Replication Without A Backup/Restore

    Posted Wed November 16, 2022 11:20 AM

    Thank you Mike.

     

    I was able to do a practice run on this today.  Interestingly and to my surprise, we did not even have to set the RSS to HDR before the failover to it (at the start we only had one RSS and no HDR).  Engine automatically took care of it with the documented commands for an HDR secondary.   The only thing we had to do at the end, after failing over and failing back, was to change what we ended up as an HDR server back to an RSS, again with a couple of commands.

     

    I see that the HDR operations seem to have improved and become a lot less error prone and a lot friendlier compared to the times several years ago when I was having to keep switching back and forth with a full re-synch every time!

     

    Hal

     






  • 4.  RE: Swapping Primary and RSS roles in HDR Replication Without A Backup/Restore

    IBM Champion
    Posted Wed November 16, 2022 11:40 AM
    I was unaware that it would automatically promote the RSS to an HDR for you.  That's good to know!

    Thank you for sharing.

    Mike

    ------------------------------
    Mike Walker
    xDB Systems, Inc
    www.xdbsystems.com
    ------------------------------