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.
Example 3-1 shows the application-class block in a Sybase configuration.
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. |
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.
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 |
| |
| 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 | | |
| backup-server-name | | |
| 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 | 0—Normal shutdown 1—Shutdown with nowait and no checkpointing 2—Shutdown with nowait with checkpointing 3—Kill all the dataserver processes | |
| monitoring-level | 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 | | |
| db-probe-time |
| |
| 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 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.
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
| Suggested Value |
|
|---|---|---|
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. |
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.
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 |
| |
| lmon-probe-time |
| |
| lmon-timeout |
| |
| 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.
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
| Suggested |
|
|---|---|---|
start-monitor-time | 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.