Replacing the Coordinator from the Command Line

Make sure that the coordinator is really down before you replace it.

Prerequisites

The coordinator process must be dead before you initiate replacement. The designated coordinator node must be included and part of the multiplex. Sybase recommends that you have a reader be the designated failover node. Readers have no pending writeable transactions, which makes failover easier.

Task
  1. Ensure that coordinator process is dead.
    If there were any read-write transactions running on secondary nodes when the original coordinator was shut down, these transactions will be rolled back. Ideally if the coordinator is running on dedicated server hardware, that computer should be shut down during the failover process.
    • On UNIX, log into the coordinator machine and make sure that the environment variables are set, then issue the following command:
      stop_iq
      and stop the appropriate iqsrv15 process.
    • On Windows, log into the coordinator machine. Start Task Manager and look for the process name iqsrv15.exe. Stop the iqsrv15.exe process.

  2. To identify the designated failover node, connect to any running multiplex server and execute the stored procedure sp_iqmpxinfo. The column coordinator_failover shows the designated failover node.
  3. Connect to the designated failover node and run COMMIT, then BEGIN TRANSACTION to ensure that this node is up to date with the latest TLV log.

    Shut down the designated failover node cleanly, using Sybase Central (Right-click > Control > Stop) or the dbstop utility.

  4. At the command line, restart the intended coordinator using the failover switch (-iqmpx_failover 1) on the server startup utility:
    start_iq -STARTDIR/host1/mpx
    @params.cfg -iqmpx_failover 1 
    -n mpxnode_w1 -x "tcpip{port=2764}"
    mpxtest.db

Once the server startup is complete, the failover process is complete and the designated failover node becomes the new coordinator node. After failover, on the next transactions, other secondary servers recognize the new coordinator and connect to it for all read-write transactions. The former coordinator becomes a reader and can be started as a regular secondary node.

To start the former coordinator, you must synchronize it against the new coordinator. Follow steps 1 through 4 in "Synchronizing Servers from the Command Line," but in step 2 (dbbackup), the connection string specified with the -c parameter must contain the new coordinator's connection parameters.

Related concepts
Requirements for Failover