Informix

nested-group-icon.png

DB2

Expand all | Collapse all

HDR

  • 1.  HDR

    Posted 12 days ago
    Hello all,

     I'm doing the HDR setup on my personal laptop with IDS 11.50(OLD ONE) for learning purpose.

    I created two server on VMWARE and did FIREWALL off and both server can ping to each other.

    I'm facing problem when I go to create 2ndary Server. I've attached the doc for the same.
    Kindly let me know , where I'm making mistake.

    I've done the setting thru /etc/hosts . No entry I made in /etc/services and /etc/hosts.equiv.

    Kindly assist.

    Thanks
    Amit patel

    ------------------------------
    AMIT PATEL
    ------------------------------

    Attachment(s)

    docx
    HDR_error.docx   240 KB 1 version
    doc
    PRIMARY CONFIGURATION.doc   54 KB 1 version


  • 2.  RE: HDR

    Posted 12 days ago
    Maybe I am wrong, but it looks like you tried to bring up the secondary server.  I would not expect the "On-Line Mode" message on the secondary.

    The restore you performed must be a physical only.  When the physical restore is done, do NOTissue any oninit commands, or onmode -m or anything else but only:

    onmode -d secondary <primary_name>



    ------------------------------
    Mike Walker
    ------------------------------



  • 3.  RE: HDR

    Posted 12 days ago
    Yes Mark, Initially I was running only "onmode -d secondary <Prim-servrr>"  , but when Didn't get proper results so I tried with oninit -PHY..

    ALL ONCONFIG parameters n dbspaces are same even.


    Regards
    Amit

    ------------------------------
    AMIT PATEL
    ------------------------------



  • 4.  RE: HDR

    Posted 12 days ago
    The mistake was the onmode -m after ontape -p -t STDIO. You should not use onmode -m and use "onmode -d secondary <primary>" when the Physical Restore has completed on HDR node. 

    As the HDR server already had a onmode -m done with checkpoint record written, you will need to do a full restore again.

    ------------------------------
    Casey Tan
    ------------------------------



  • 5.  RE: HDR

    Posted 12 days ago
    The onmode -d secondary <primary> MUST be done after the physical restore is done and BEFORE any onmode -m or oninit commands are executed on the restored server.  If you do not do this, there will be activity in the logs of the restored server and you will not be able to establish replication.  As Casey said, you will need to perform the restore again.

    ------------------------------
    Mike Walker
    ------------------------------



  • 6.  RE: HDR

    Posted 12 days ago
      |   view attached
    Hi Mike,

              I took both servers on ONLINE mode amd started the process from starting.

                        Primary -
    BACKUP  -->      ontape -s -L 0;
    MODE      -->      onmode -d primary <sec_server>
    STATUS  -->     -- On-Line (Prim)
    ONLINE LOG -->              09:37:09 DR: Cannot connect to secondary server
                                              09:37:09 DR: Turned off on primary server
                             
                              SECONDARY

    RESTORE  -->     ontape -p
    MODE        -->      onmode -d secondary <prim_server>
    ERROR     -->       DR: Unable to change server type
                                  onmode: Please check the message log for errors.
    STATUS     -->      -- On-Line --   (No Read_only <Sec>)
    ONLINE LOG -->  09:35:35 Booting Language <spl> from module <>
                                  09:35:35 Loading Module <SPLNULL>
                                  09:35:35 SCHAPI: 'sysadmin' database setup is incomplete.       (No idea if something linked with sysadmin error)
                                  09:35:35 SCHAPI: Failed to setup dbScheduler thread.
                                  09:35:36 On-Line Mode
                                  09:38:05 DR: Server not in quiescent mode   ( Don't know why it stuck here).


    First I just run the ontape -s -L 0 on primary and ontape -p on secondary without copying the backup file on secondary.
    and then scp backup file to secondary and followed the step again.

    Attached word file.
    Kindly check and help.

    ------------------------------
    AMIT PATEL
    ------------------------------

    Attachment(s)

    docx
    HDR_secondary_start.docx   13 KB 1 version


  • 7.  RE: HDR

    Posted 12 days ago
    The secondary MUST be OFFLINE when you do the restore (a COLD restore).

    The restore of the secondary must use the backup that was taken from the Primary, so the backup MUST be copied over to the secondary BEFORE you begin the restore.

    Basically it should be similar to the following:

    Secondary:
    onmode -ky

    Primary:
    ontape -s -L 0
    scp archive file to secondary

    Secondary:
    Make sure backup from the primary is available and will be referenced by the restore...
    ontape -p

    When restore is complete...


    Primary:
    onmode -d primary <sec_server>

    Secondary:
    onmode -d secondary <pri_server>






    ------------------------------
    Mike Walker
    ------------------------------



  • 8.  RE: HDR

    Posted 12 days ago
    Dear Mike,

        Thanks for Steps. I followed in the same way , but still it is showing FAST RECOVERY<sec>

    online.log
    11:55:27 Maximum server connections 0
    11:56:36 DR: Reservation of the last logical log for log backup turned off
    11:56:36 DR: new type = secondary, primary server name = on_nebula31
    11:56:36 SDS: No server name was found in either DBSERVERNAME or DBSERVERALIASES that
    can be used by SDS servers to connect to this server.
    11:56:36 DR: Could not set the disk owner information in the reserved pages.


    And moreover when I take the full backup on primary and scp to secondary and run ontape -p , restore fails.. So I rename the backup file manually.

    informix@sk-om-ifx-401:/backup/tapedev> ontape -p
    Restore file /backup/tapedev/sk-om-ifx-401_1_L0 and press Return to continue ...

    File /backup/tapedev/sk-om-ifx-401_1_L0 not found, continuing ...
    Physical restore failed - function open tape device /backup/tapedev/ failed code -1 errno 2

    Program over.
    informix@sk-om-ifx-401:/backup/tapedev> cp sk-om-ifx-402_1_L0 sk-om-ifx-401_1_L0
    informix@sk-om-ifx-401:/backup/tapedev> cp sk-om-ifx-402_1_L0 sk-om-ifx-401_1_L0
    informix@sk-om-ifx-401:/backup/tapedev> onstat -
    shared memory not initialized for INFORMIXSERVER 'on_nebula21'
    informix@sk-om-ifx-401:/backup/tapedev> ontape -p
    Restore file /backup/tapedev/sk-om-ifx-401_1_L0 and press Return to continue ...

    after Restore done.

    informix@sk-om-ifx-401:/backup/tapedev> onstat -

    IBM Informix Dynamic Server Version 11.50.UC1 -- Fast Recovery -- Up 00:00:58 -- 145208 Kbytes

    informix@sk-om-ifx-401:/backup/tapedev> onmode -d secondary on_nebula31
    informix@sk-om-ifx-401:/backup/tapedev> onstat -

    IBM Informix Dynamic Server Version 11.50.UC1 -- Fast Recovery (Sec) -- Up 00:01:24 -- 145208 Kbytes

    ------------------------------
    AMIT PATEL
    ------------------------------



  • 9.  RE: HDR

    Posted 11 days ago

    In your sqlhosts file, on_nebula31 is defined as both onipcshm and onsoctcp, this is incorrect, each server alias should be unique to either ipcshm or soctcp. Pri to HDR communication only works on tcp, for your testing, you can comment out the onipcshm entries and configure it later using a different server alias name.




    ------------------------------
    Casey Tan
    ------------------------------



  • 10.  RE: HDR

    Posted 11 days ago
    Dear Casey,

     Now I have changed all settings.
                     PRIMARY SQLHOSTS
    # sqlexec-ssl 9089/tcp

    on_nebula31 onsoctcp sk-om-ifx-402 soc_nebula31
    on_nebula32 onsoctcp sk-om-ifx-402 soc_nebula32
    ~
           PRIMARY /etc/services
                        soc_nebula31 51001/tcp
                        soc_nebula32 51002/tcp

    PRIMARY /etc/hosts.equiv
           # hostname
              on_nebula21

    IN the same way changed for Secondary.
                SECONDARY SQLHOSTS
    # sqlexec-ssl 9089/tcp

    on_nebula21 onsoctcp sk-om-ifx-401 soc_nebula21
    on_nebula22 onsoctcp sk-om-ifx-401 soc_nebula22
    ~

    SECONDARY /etc/services
        soc_nebula21 51001/tcp
        soc_nebula22 51002/tcp
     
    SECONDARY /etc/hosts.equiv
        # hostname
           on_nebula31

    After all these setting Primary server has no issue to start , but still getting same error for Secondary.

    informix@sk-om-ifx-401:~/etc> onstat -

    IBM Informix Dynamic Server Version 11.50.UC1 -- Fast Recovery (Sec) -- Up 00:13:03 -- 144144 Kbytes

    online.log
    15:04:19 DR: Reservation of the last logical log for log backup turned off
    15:04:19 DR: new type = secondary, primary server name = on_nebula31
    15:04:19 DR: Owner of the disk is set as on_nebula21.
    15:04:19 Cannot create SMX pipes
    15:04:19 DR: Trying to connect to primary server = on_nebula31
    15:04:19 DR: Cannot connect to primary server
    15:04:19 DR: Turned off on secondary server




    ------------------------------
    AMIT PATEL
    ------------------------------



  • 11.  RE: HDR

    Posted 11 days ago
    Hi Amit,

    on_nebula21 has to be aware of connection details of on_nebula31 and vice versa, so first of all you need to add on_nebula31's sqlhosts line to on_nebula21's sqlhosts file and also the other way round - how else could a connection be established from one to the other?

    Then there's /etc/hosts.equiv which you seem to be citing for trust purposes.
    For simple educational purposes relying on this might be ok, but it shouldn't be deemed state of the art any more as it establishes machine level trust for everyone -> consider Informix instance specific trust through REMOTE_SERVER_CFG onconfig parameter instead.
    Yet more importantly, if I'm reading your post right, you put an Informix server name there (on_nebula*) which is not at all what is expected in this file - put the opposite side's hostname (sk-om-ifx-40*) instead.  (Remember that /etc/hosts.equiv predates Informix and originally was meant to establish trust for e.g. 'rlogin' remote terminal sessions.)

    Lastly, it's almost hurting my eyes to see version 11.50, and FC1 at that ;-)
     -> why not using most recent v12.10 or v14.10 fixpack (developer edition) for educating yourself on present technology?
     -> once there, and once getting to grips with manual HDR setup, you might want to explore ifxclone utility which makes things even easier, and also a lot faster, esp. with a real-live large instance.

    HTH,
     Andreas

    ------------------------------
    Andreas Legner
    ------------------------------