Performing failback

Failback is accomplished in four steps:

  1. Prepare for failback.

    NoteIBM HACMP for AIX automatically fails back when the primary node is ready to resume normal companion mode. See Chapter 8, “Configuring Adaptive Server for Failover on IBM AIX,” for more information.

    Issuing sp_companion with the prepare_failback option forces the secondary companion to release the database devices and the databases. Issue prepare_failback from the secondary companion. The syntax is:

    sp_companion server_name ‘prepare_failback’
    

    where server_name is the name of the secondary companion. The secondary companion issues messages similar to the following during failback:

    Step:Access across the servers verified
    Step:Primary databases are shutdown in secondary
    Step:Primary databases dropped from current secondary
    Step:Primary devices released from current secondary
    Step:Prepare failback for primary server  complete
    (return status = 0)
    

    The last step of prepare_failback is to move the devices back to the primary node according to individual platform subsystem.

  2. Reboot Adaptive Server on the Primary Machine.

    The high availability subsystem reboots the primary companion automatically.

  3. Run do_advisory.

    Run sp_companion with the do_advisory option to make sure there are no attribute settings that will prevent the failback operation from succeeding. For more information about do_advisory, see Chapter 6, “Running do_advisory,”

  4. Resume Normal Companion Mode

    After failback is complete, issue sp_companion from the primary companion (the companion that originally failed) to return to normal companion mode. For example:

    sp_companion PERSONNEL1, resume
    
    Step: Checkin to See if the remote server is up
    Step: Access across the servers verified
    Step: User information syncup succeeded
    (return status = 0)
    

    See the configuration chapter for your platform for more information about sp_companion resume.

    NoteYou cannot connect clients with the failover property (for example isql -Q) until you issue sp_companion resume. If you try to reconnect them after issuing sp_companion prepare_failback, the client hangs until you issue sp_companion resume.