Chapter 3. Configuration File Blocks for Sybase

Sybase configuration parameters must be specified in the /var/ha/ha.conf configuration file. Sections in this chapter describe each Sybase specific block that must be added and the configuration parameters within each of those blocks. The sections are as follows:

The examples in this chapter show the Sybase configuration file blocks for the example discussed in the sections “Example Sybase Configuration” and “Configuration Parameters for Sybase” in Chapter 2.

Sybase Application-Class Block

Example 3-1 shows the application-class block in a Sybase configuration.

Example 3-1. Sybase Application-Class Block


application-class sybase
{
        server-node = xfs-ha1
        agent = /usr/etc/ha_sybs
}

The application-class sybase block contains these configuration parameters:

server-node  

Lists a node that is a primary server for an SQL Server. In this example, just one node is listed because just one node is a primary node for an SQL Server. If both nodes are primary nodes for SQL Servers, server-node is listed twice.

agent  

The full pathname of the database agent for Sybase. You should not change this parameter.

Sybase Blocks

IRIS FailSafe configuration files contain one sybase block for each SQL Server that is a highly available service.

Example 3-2 shows an example sybase block.

Example 3-2. Sybase Block


sybase SYBASE_11
{
    master-db-fs = shsybs11
    backup-server-network-name = SYB_BACKUP
    backup-server-name = SYB_BACKUP
    unix-user = sybase
    sa-user = sa
    sa-passwd = sa_p
    release-dir = /usr/sybase
    shutdown-options = 2
    monitoring-level = 2
    db-avail = high
    db-probe-time = 120
    db-timeout = 120
    start-monitor-time = 300
    db-retry-count = 1
}

The label for the sybase block, SYBASE_11 in this example, is the name of the SQL Server. The other parts of this guide refer to this as the sqlServerName. Configuration parameters used in sybase blocks are as follows:

master-db-vol  


The value must match the label of a volume block. See the discussion at the end of this section about master-db-vol and master-db-fs for information about which volume block label to use. This parameter or master-db-fs must be specified.

master-db-fs  

The value must match the label of a filesystem block. See the discussion at the end of this section about master-db-vol and master-db-fs for information about which filesystem block label to use. This parameter or master-db-vol must be specified.

unix-user  

The IRIX login name that is the owner of the Sybase release directory.

backup-server-network-name  


If the SQL server has a sybase backup server, this field must be specified. The backup server network name is the network name field in the SQL server's “sysservers” system table. It is same as the name of the server in the $SYBASE/install/RUN_sqlServerName backup server startup script. This field is used to start the backup server. This field is optional.

backup-server-name  


The backup server's logical name as specified in the SQL server's “sysservers” system table. This value can be obtained by executing the stored “sp_helpserver” procedure. This field is used to shutdown the backup server, and is optional.

release-dir  

The Sybase release directory specified in the Sybase configuration. This value is also the value of the environment variable SYBASE. This parameter is required.

sa-user  

The Sybase login name of the Sybase database system administrator. This parameter is required.

sa-passwd  

The unencrypted password of the Sybase database system administrator (sa-user). This parameter should be omitted if there is no password.

shutdown-options  


Defines how the SQL Server is shut down on a failover. It is required. The possible values are these:

0—Normal shutdown

1—Shutdown with nowait and no checkpointing

2—Shutdown with nowait with checkpointing

3—Kill all the dataserver processes

monitoring-level  


This field determined the type of monitoring that FailSafe/Sybase uses to monitor the servers. This field is required. The possible values are:

1—FailSafe checks if the server processes are running

2—The FailSafe/Sybase agent executes the stored procedure “sp_failsafe_mon” to determine if the sybase server is running

db-avail  

The possible values are high and low. If the value is high, an SQL Server failure forces a failover. If the value is low, a failure of the SQL Server does not force a failover, but the failure is reported by sending mail to the address indicated by the “mail-dest-addr” parameter. The default value is high.

start-monitor-time  


The amount of time that the Sybase database agent waits after receiving a message to start monitoring before it performs its first probe of the SQL Server. This wait ensures that the SQL Server has had time to start up.

db-probe-time  


Defines the length of time (in seconds) between the completion of one probe of the SQL Server by the Sybase database agent and the beginning of the next probe. This parameter is required.

db-timeout  

Defines the time the Sybase database agent waits for a response to its probe from the SQL Server in seconds. This parameter is required.

db-retry-count  


The number of monitoring retries by the database agent before a failure is declared.

The Sybase database files could reside in multiple filesystems and on multiple logical volumes. You must choose one of these filesystems or volumes to be the “master” and specify it as the value of master-db-fs or master-db-vol. Typically it should be the volume or filesystem where master.dat resides. The sybase blocks do not list all filesystems and volumes that are part of the SQL Server. However, the configuration file must list all volumes and filesystems used by each SQL Server in volume and filesystem blocks (see the sections “Volume Blocks” and “Filesystem Blocks” in Chapter 2 of the IRIS FailSafe Administrator's Guide for information on these blocks). The IRIS FailSafe system uses the volume and filesystem blocks as a specification of the shared storage that must be online prior to bringing up the SQL Server.

Figure 3-1 shows the monitoring frequency parameters in each sybase block. They control the monitoring of an SQL Server by the Sybase database agent.

Figure 3-1. Monitoring Frequency Configuration Parameters in Sybase Blocks


Table 3-1 lists each of these monitoring frequency parameters and their suggested values. It also describes relationships between different parameters and the rounding that occurs for some parameter values.

Table 3-1.  Values for Monitoring Frequency Configuration Parameter in Sybase Blocks


Parameter

Suggested Value


Comments

start-monitor-time (sybase block)

300

Rounded to the nearest ten seconds. The minimum value is the value of long-timeout.

db-probe-time

120

Rounded to the nearest ten seconds.

db-timeout

120

Rounded to the nearest ten seconds.

db-retry-count

1

The minimum value is 1.


Sybase Action and Action-Timer Blocks

Example 3-3 shows the action and action-timer blocks for Sybase. The action block specifies the pathnames of the local monitoring script and the action-timer block specifies monitoring timing and timeout values for the monitoring of the Sybase database agent by the application monitor.

Example 3-3. Sybase Action and Action-Timer Blocks


action sybase
{
        local-monitor = /var/ha/actions/ha_sybs_lmon
}

action-timer sybase
{
        start-monitor-time = 300
        lmon-probe-time = 60
        lmon-timeout = 30
        retry-count = 2
}

The parameters used in action and action-timer blocks for Sybase are as follows:

local-monitor  

The pathname of the local monitoring script for Sybase. Do not change this value.

start-monitor-time  


Specifies the amount of time that the application monitor waits before it starts using the local monitoring script to monitor the Sybase database agent. The value of this parameter should be greater than or equal to the largest value specified for start-monitor parameters in any of the sybase blocks and it should be greater than or equal to the value of long-timeout.

lmon-probe-time  


Local monitoring of the Sybase agent is done this often (in seconds).

lmon-timeout  


Local monitoring of the Sybase agent times out in this many seconds if no response is received.

retry-count  

Specifies the number of probes to the Sybase database agent done by the monitoring script. This value doesn't affect the lmon-timeout value.

Figure 3-2 shows the monitoring parameters in the “action-timer sybase” block. They control the monitoring of the Sybase database agent by the local monitoring script.

Figure 3-2. Monitoring Configuration Parameters in the Action-Timer Block for Sybase


Table 3-2 lists each of these monitoring parameters and their suggested values. It also describes relationships between different parameters and the rounding that occurs for some parameter values.

Table 3-2. Values for Monitoring Frequency Configuration Parameter in Sybase Action-Timer Blocks


Parameter

Suggested
Value


Comments

start-monitor-time
(action-timer block)

300

The minimum value is the value of long-timeout. Should be greater than or equal to the largest of the values specified for start-monitor-time in any of the sybase blocks.

lmon-probe-time

60

 

lmon-timeout

30

 

retry-count

2

This value does not affect the lmon-timeout value. The minimum value is 1.

The length of time it takes the database agent to access SQL Servers is variable, so you have to be very careful in choosing the monitoring time values so that you do not get false failovers. The values suggested as defaults are just a start point if using the default stored procedure.

While tuning the monitoring time parameters, it is a good idea to define db-avail as low, so that if there is a monitoring failure IRIS FailSafe does not failover. A message is logged in the /var/adm/SYSLOG file, so you know that a failover would have occurred if db-avail had been set to high.