Installing a callback handler  Enabling Sybase Failover

Chapter 2: Using Coordination Modules

Creating a complete coordination module

OpenSwitch provides a sample of a self-contained CM that coordinates the activities of an OpenSwitch server and demonstrates most of the calls in libcm. See the sample code file, which is installed along with OpenSwitch, in $OPENSWITCH/sample/cml.c on UNIX and in %OPENSWITCH%\sample\cml.c on Windows.

The CM in the sample file responds to login attempts and login retries.

Event

Response

Login attempt

Login is allowed through the server that was automatically chosen by OpenSwitch.

Login retry

The Adaptive Server® that the failing spid is attempting to connect to is pinged. If the server is available, the spid is killed. If the server cannot be pinged, the connection tries the next server.





Copyright © 2005. Sybase Inc. All rights reserved. Enabling Sybase Failover

View this book as PDF