Manual Failover

From SybaseWiki
Jump to: navigation, search

The failback procedure for an active-standby ASE setup (with OpenSwitch and optionally RCM) has been documented by Sybase but a manual failover not. This procedure is documented below. You can use it when you want to perform maintenance on the active database server and need to transfer connections in a controlled manner to the standby ASE. The procedure assumes you are using RCM.

  • Logon to OpenSwitch as the administrative user
  • Lock the active database server so new connections cannot be made: rp_server_status <active-ase>,locked
  • Stop sessions from invoking new transactions: rp_stop null,<active-ase>,null,1,1
  • Logon to the active ASE
  • Monitor the progress of the RepAgent until all transactions have been transfered to the Replication Server: sp_help_rep_agent <database>,"scan"
  • Kill the cmon user in ASE and do a shutdown: kill <cmon-user-spid> shutdown
  • Logon to OpenSwitch as the administrative user
  • Resume session activity: rp_start null,<active-ase>,null
  • Change the server-status to up: rp_server_status <active-ase>,up
  • Initiate a new session to the active ASE through OpenSwitch: isql -U<user> -P<password> -S<openswitch>. When you have done this RCM will see that the active ASE is down and it will start the failover process.

When you have used this procedure you can be sure that all connections are transfered without the need to logon again. Also, all transactions made on the active ASE are guaranteed to be delivered at the Replication Server.