Recovering from a secondary failover on the secondary companion

If the primary companion is in normal companion mode, but the secondary companion is in failover mode, the cluster is in an inconsistent state, and you must recover manually. The inconsistent state may be caused by sp_companion 'prepare_failback' failing on the secondary companion. To recover:

  1. Issue sp_helpdb on the secondary companion to see if any primary companion databases (for example, the master_companion) are mounted on the secondary companion.

  2. Make sure the primary databases are accessible from the secondary node. To do this, move the primary SUNW.HAStorage resource to the secondary node, which can be done by disabling the primary Adaptive Server resource and starting the primary resource group on the secondary node. For example, the following starts the primary resource group rg_MONEY1 on the secondary node:

    scswitch -z -h node2  -g  rg_MONEY1
    
  3. Issue ha_admin:

    dbcc ha_admin("",  "rollback_failover")