Chapter 1. IRIS FailSafe Sybase Overview

This chapter provides information about the components that are added to the base IRIS FailSafe product by the IRIS FailSafe Sybase option, and assumes that you are familiar with the basic components of IRIS FailSafe described in Chapter 1 of the IRIS FailSafe Administrator's Guide . This chapter also lists the steps you take to add Sybase SQL Servers to the highly available services that are failed over on an IRIS FailSafe cluster. The major sections in this chapter are as follows:

Sybase Failover

IRIS FailSafe provides high availability for Sybase SQL Servers by monitoring them and quickly failing them over to the other node in the cluster if a failure is detected and IRIS FailSafe has been configured to fail over when a failure is detected. The clients connected to the Sybase SQL Servers that have been failed over experience a disconnection. It is the client's responsibility to handle the disconnection by trying to reconnect until the SQL Servers (now on the other node) respond. Refer to Chapter 1 of the IRIS FailSafe Administrator's Guide for more information about the interruption of services for clients.

IRIS FailSafe Sybase SQL Server Monitoring

The IRIS FailSafe Sybase option includes three components that perform monitoring of Sybase SQL Servers: the monitoring script /var/ha/actions/ha_sybs_lmon, the database agent /usr/etc/ha_sybs, and a Sybase stored procedure called sp_failsafe_mon. IRIS FailSafe Sybase does not monitor Sybase Backup Servers, but it can be used to start and shutdown Sybase Backup Servers. (This is controlled by the optional backup-server parameters in sybase blocks in the configuration file /var/ha/ha.conf. See the section “Sybase Blocks” in Chapter 3 for more information.)

Sybase Database Agent

The IRIS FailSafe Sybase option includes a database agent, /usr/etc/ha_sybs, which monitors Sybase SQL Servers to determine their liveliness. It interacts with other IRIS FailSafe components as shown in Figure 1-1.

Figure 1-1. Sybase Database Agent Component in IRIS FailSafe


For each SQL Server listed in the /var/ha/ha.conf configuration file, ha_sybs opens a connection to the SQL Server and periodically executes a monitoring stored procedure called sp_failsafe_mon to determine if the SQL Server is running (see the next section, “Monitoring Stored Procedure,” for more information about the monitoring stored procedure). Depending on the value returned by sp_failsafe_mon, ha_sybs determines the health of the SQL Server being monitored.

If ha_sybs detects a failure, it takes one of two actions, based on the value of the db-avail configuration parameter:

  • If db-avail is low, ha_sybs reports the failure with a message in /var/adm/SYSLOG.

  • If db-avail is high, ha_sybs exits. The application monitor detects that ha_sybs isn't running and reports a local monitoring failure to the node controller. Based on the states of the nodes in the cluster, the node controller determines the actions to be taken, which may include failing over the services on the node to the other node.

Because ha_sybs is a multi-threaded processes, you may see several instances of it running on a system simultaneously when you look at the output of the ps command.

Monitoring Stored Procedure

When the Sybase database agent ha_sybs starts monitoring, it looks for the stored procedure sp_failsafe_mon. If it is not found, ha_sybs installs a default stored procedure sp_failsafe_mon in the sybsystemprocs database. This default stored procedure is very simple and not very intrusive to the Sybase SQL Server. It executes a query on an object in the sybsystemprocs database. If the query succeeds it returns 0. If it fails returns 1. The SQL code of the default sp_failsafe_mon is as follows:

if exists (select name from sysobjects where
                type = "S" and name = "sysobjects")
        return 0
else
        return 1

You can replace this default stored procedure with a different stored procedure. See the section “Customizing the Monitoring Stored Procedure” in Chapter 2 for more information.

Overview of Configuring IRIS FailSafe for Sybase

To configure an IRIS FailSafe cluster for failover of Sybase databases, follow these steps:

  1. Install, configure, and test the base IRIS FailSafe software as described in the IRIS FailSafe Administrator's Guide .

  2. Install additional software if required. See the section “Required Software” in Chapter 2.

  3. Choose how to configure Sybase software and databases on the disks. See the section “Planning Sybase Configuration” in Chapter 2.

  4. If desired, replace the default monitoring stored procedure with a customized stored procedure. See the section “Customizing the Monitoring Stored Procedure” in Chapter 2.

  5. Add Sybase information to the configuration file, /var/ha/ha.conf. See the section “Adding Sybase Information to the Configuration File” in Chapter 2.

  6. Install the new configuration file. See the section “Installing the Configuration File” in Chapter 2.

  7. Test Sybase failover. See the section “Testing Sybase Failover” in Chapter 2.