Sunteți pe pagina 1din 48

VERITAS Cluster Server

Enterprise Agent 4.0 for


Sybase

Installation and Configuration Guide


Solaris

N11191F

January 2004
Disclaimer
The information contained in this publication is subject to change without notice. VERITAS Software
Corporation makes no warranty of any kind with regard to this manual, including, but not limited to,
the implied warranties of merchantability and fitness for a particular purpose. VERITAS Software
Corporation shall not be liable for errors contained herein or for incidental or consequential damages
in connection with the furnishing, performance, or use of this manual.

VERITAS Legal Notice


Copyright 1998-2004 VERITAS Software Corporation. All rights reserved. VERITAS, VERITAS
Software, the VERITAS logo, VERITAS Cluster Server, and all other VERITAS product names and
slogans are trademarks or registered trademarks of VERITAS Software Corporation. VERITAS, the
VERITAS Logo, and Cluster Server Reg. U.S. Pat. & Tm. Off. Other product names and/or slogans
mentioned herein may be trademarks or registered trademarks of their respective companies.
VERITAS Software Corporation
350 Ellis Street
Mountain View, CA 94043
USA
Phone 6505278000 Fax 6505272901
www.veritas.com

ii VCS Enterprise Agent for Sybase Installation and Configuration Guide


Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
How This Guide is Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .vii
Getting Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
Telephone and Fax Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii

Chapter 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Supported Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
About the VCS Enterprise Agent for Sybase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
SQL Server Agent: Sybase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Backup Server Agent: SybaseBk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Monitoring Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
How the Agent makes Sybase Highly Available . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Typical Sybase Configuration in a VCS Cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Setting Up a Sybase Cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Chapter 2. Installing Sybase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9


Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Additional Considerations for Installing Sybase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Sybase Installation Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
$SYBASE Directory on Shared Disks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Database Dbspaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Transparent TCP/IP Failover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Long Pathname Limitation for $SYBASE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

iii
Language Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Chapter 3. Installing the Sybase Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13


Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Installation Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Upgrading the Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Chapter 4. Configuring the Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17


Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Configuring the Agent Using Cluster Manager (Java Console) . . . . . . . . . . . . . . . . . . . 18
Importing the SybaseTypes.cf File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Adding the Sybase Group Using the Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Configuring the Agent by Editing the Configuration Files . . . . . . . . . . . . . . . . . . . . . . 20
Setting the Sybase Password Attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Using a Soft Link to a $SYBASE Pathname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Modifying the Agent Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Database Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Setting Up Detail Monitoring for Sybase Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Chapter 5. Administering the Sybase Service Group . . . . . . . . . . . . . . . . . . . . . . . . 27


Bringing the Service Group Online . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Taking the Service Group Offline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Switching the Service Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Viewing the Agent Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Disabling the Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Removing the Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Appendix A. Resource Type Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31


Sybase Resource Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Attribute Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
SybaseBk Resource Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

iv VCS Enterprise Agent for Sybase Installation and Configuration Guide


Attribute Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Appendix B. Sample Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35


Resource Dependency Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Sample Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39

Contents v
vi VCS Enterprise Agent for Sybase Installation and Configuration Guide
Preface
This book describes how to install and configure the VERITAS Cluster ServerTM (VCS)
Enterprise Agent 4.0 for Sybase.
If this document is dated more than six months prior to the date you are installing your
enterprise agent, contact VERITAS Technical Support to confirm you have the latest
supported versions of the application and operating systems.

How This Guide is Organized


Chapter 1. Introduction on page 1 presents a brief introduction of the VCS enterprise
agent for Sybase.
Chapter 2. Installing Sybase on page 9 describes how to install and configure Sybase in
a VCS cluster.
Chapter 3. Installing the Sybase Agent on page 13 describes how to install VCS
enterprise agent for Sybase in a VCS cluster.
Chapter 4. Configuring the Agent on page 17 describes how to configure a Sybase
agent in a VCS cluster.
Chapter 5. Administering the Sybase Service Group on page 27 describes the
administrative tasks you can perform on a Sybase service group.
Appendix A. Resource Type Definitions on page 31 lists the resource type definitions
and attribute definitions for the VCS enterprise agent for Sybase.
Appendix B. Sample Configuration on page 35 provides the sample configurations for
the Sybase service group.

vii
Getting Help

Getting Help
For technical assistance, visit the VERITAS Technical Services Web site at
http://support.veritas.com. From there you can:
Contact the VERITAS Technical Services staff and post questions to them.
Download the latest patches and utilities.
View the VERITAS Cluster Server Frequently Asked Questions (FAQ) page.
Search the knowledge base for answers to technical support questions.
Receive automatic notice of product updates.
Learn about VERITAS Cluster Server training.
Read white papers related to VERITAS Cluster Server.
Access the latest product documentation and technical notes.

Telephone and Fax Support


Telephone and fax support for VERITAS Cluster Server is available only with a valid
support contract. To contact Technical Services, dial the appropriate phone number listed
on the Technical Support Guide included in the product box. Have your product license
information ready to ensure you are routed to the proper support personnel.

Conventions

Typeface/Font Usage

bold names of screens, windows, tabs, dialog boxes, options, buttons

italic new terms, book titles, emphasis, variables in tables or body text

Courier computer output, command references within text

Courier (bold) command-line user input, keywords in grammar syntax

Courier (bold, italic) variables in a command

Symbol Usage

# superuser prompt (for all shells)

viii VCS Enterprise Agent for Sybase Installation and Configuration Guide
Introduction 1
VERITAS Cluster ServerTM (VCS) enterprise agents monitor specific resources within an
enterprise application, determine the status of these resources, and start or stop them
according to external events. The VCS enterprise agent for Sybase provides high
availability for Sybase in a VCS Cluster.
VCS Enterprise Agent for Sybase provides active/passive support for Sybase. For
active/active support, contact Sybase for their agent.

Supported Software
Sybase Adaptive Server Enterprise (ASE) 11.x through 11.9.2, 12.0, and 12.5. ASE
consists of a SQL Server and a Backup Server.
Solaris 2.6, 2.7, 2.8, and 2.9.
VCS 4.0.

1
About the VCS Enterprise Agent for Sybase

About the VCS Enterprise Agent for Sybase


The Sybase agent brings the configured Sybase servers online, monitors them, and takes
them offline.
The package contains two VCS agents:
SQL Server Agent: Sybase
Backup Server Agent: SybaseBk
The agents include VCS type declarations and agent executables, and are represented
with Sybase and SybaseBk resource types, respectively. Both agents work together to
make Sybase highly available in a cluster.

SQL Server Agent: Sybase


The SQL server agent starts a Sybase SQL Server, monitors the SQL Server processes, and
shuts down a Sybase SQL Server. Specific agent operations include:
Online Starts the SQL Server by using the following command:
startserver -f $SYBASE/install/RUN_$Server
Offline Stops the SQL Server by using the isql command in the following manner:
It first executes the command shutdown with wait. If this fails, the offline
script executes shutdown with nowait.
Clean Forcibly stops the Sybase database by using the isql command in the
following manner:
It first executes the command shutdown with wait. If this fails, the clean script
executes shutdown with nowait.
If the process does not respond to the shutdown command, the agent scans the
process table for processes associated with the configured database and kills them.
Monitor Scans process table for dataserver and runs Monscript as an option.

2 VCS Enterprise Agent for Sybase Installation and Configuration Guide


About the VCS Enterprise Agent for Sybase

Backup Server Agent: SybaseBk


The Backup Server agent starts a Sybase Backup Server, monitors the backup server
process, and shuts down a Sybase Backup Server. Specific agent operations include:
Online Starts the Backup Server by using the following command:
startserver -f $SYBASE/install/RUN_$BackupServer
Offline Stops the Backup Server by using the following isql command:
It first executes the command shutdown SYS_BACKUP with wait. If this fails,
the offline script executes shutdown SYS_BACKUP with nowait.
Clean Forcibly stops the Sybase Backup Server by using the isql command in the
following manner:
It first executes the command shutdown SYS_BACKUP with wait. If this fails,
the clean script executes shutdown SYS_BACKUP with nowait.
If the process does not respond to the shutdown command, the agent scans the
process table for processes associated with the configured Sybase Backup Server and
kills them.
Monitor Scans process table for backupserver.

Chapter 1, Introduction 3
Monitoring Options

Monitoring Options
The VCS enterprise agent for Sybase provides two levels of application monitoring:
primary (basic) and secondary (detail).
The basic level monitors the Sybase daemon processes to verify that they are running.
Detail monitoring performs a transaction on a test table in the database to ensure that
Sybase is functioning properly. See Setting Up Detail Monitoring for Sybase Agent on
page 24 for more information about modifying monitoring options for a Sybase agent.

How the Agent makes Sybase Highly Available


In the basic monitoring mode, the agent detects an application failure if a configured
Sybase server process is not running. In the detail monitoring mode, the agent detects
application failure if it cannot establish a client connection with the configured Sybase
server
When the agent detects that the configured Sybase server is not running on a system, the
Sybase service group is failed over to the next available system in the service groups
SystemList. The configured Sybase servers are started on the new system, thus ensuring
high availability for the Sybase server and data.

4 VCS Enterprise Agent for Sybase Installation and Configuration Guide


Typical Sybase Configuration in a VCS Cluster

Typical Sybase Configuration in a VCS Cluster


A typical VCS configuration is on a two-node cluster. The Sybase data is installed on
shared disks. The Sybase server binaries can be installed locally on both nodes or on
shared disks. The Sybase agent is installed on both nodes. The shared disks can be
managed using VERITAS Volume Manager (VxVM).
In the configuration depicted in the illustration below, the Sybase servers, including
binaries and data, are installed completely on shared disks or shared cluster disk groups
managed using VxVM.

VCS Private Network

Node 1 Node 2

Shared Disks / Cluster Disk Groups

Sybase
Binaries &
Data

Public Network

Chapter 1, Introduction 5
Typical Sybase Configuration in a VCS Cluster

In the configuration depicted in the illustration below, the Sybase binaries are installed
locally on each node in the cluster and the Sybase data is on shared disks or shared cluster
disk groups managed using VxVM.

VCS Private Network


Sybase Sybase
Binaries Binaries

Node 1 Node 2

Shared Disks / Cluster Disk Groups

Sybase
Data

Public Network

6 VCS Enterprise Agent for Sybase Installation and Configuration Guide


Setting Up a Sybase Cluster

Setting Up a Sybase Cluster


Setting up an Sybase cluster in a VCS environment involves the following tasks. Each task
is described in detail in subsequent chapters.

Setting up a VCS cluster (described in the VCS Installation Guide)

Installing Sybase on page 9

Installing the Sybase Agent on page 13

Configuring the Agent on page 17

Chapter 1, Introduction 7
Setting Up a Sybase Cluster

8 VCS Enterprise Agent for Sybase Installation and Configuration Guide


Installing Sybase 2
This chapter describes how to install and configure Sybase in a VCS Cluster. The chapter
also lists the prerequisites for installing Sybase. For more information on installing Sybase,
refer to Sybase documentation on Solaris.

Prerequisites
Install and configure VCS. If necessary, see the VERITAS Cluster Server Installation
Guide.
Verify that all systems in the cluster have adequate resources to run Sybase and VCS.

9
Additional Considerations for Installing Sybase

Additional Considerations for Installing Sybase

Sybase Installation Directory


Verify that the Sybase installation directory containing the Sybase binaries and
configuration files is located on shared disks. This installation directory is specified by the
environment variable $SYBASE. Create the same $SYBASE mount points on each system.

$SYBASE Directory on Shared Disks


All database devices, including master devices, sybsystemprocs, and user, must be
located on shared disks. If the database devices are created on file systems, the file
systems must also be located on shared disks. Create the same file system mount points
on each system.

Database Dbspaces
If you are using shared disks for dbspaces, change the permissions, or access mode, on the
disk groups that store the Sybase data. Change the permissions for sybase to 660.
For example, if you are using VERITAS Volume Manager, type:
# vxedit -g diskgroup_name set group=dba
user=sybase mode=660 volume_name

Transparent TCP/IP Failover


For transparent failover to Sybase clients, create an IP address as part of the Sybase service
group. This IP address must match the dataserver and backup server entries in the
$SYBASE/interfaces file. For information on the format for adding entries to the
$SYBASE/interfaces file, refer to your Sybase documentation.

Long Pathname Limitation for $SYBASE


The Solaris process table limits process pathnames to 79 characters. The full pathname of
processes in $SYBASE can possibly have 80 characters or more. In this case, you can create
a soft link to the $SYBASE directory and use it in place of the long filename in the
appropriate Sybase installation files. See Using a Soft Link to a $SYBASE Pathname on
page 22 for a list of files to be edited and examples.

10 VCS Enterprise Agnet for Sybase Installaion and Configuration Guide


Additional Considerations for Installing Sybase

Language Settings
For the Sybase Enterprise Agent to function with the desired locale, make sure that the
Sybase installation has the correct localization files. For example, if the Sybase server
requires LANG=en_US.UTF-8 environment variable, verify that the localization files
corresponding to language en_US.UTF-8 are installed with Sybase. Also, edit the file
$VCS_HOME/bin/vcsenv to contain the following:
LANG=en_US.UTF-8;export LANG
The above change would affect all VCS agents.

Chapter 2, Installing Sybase 11


Additional Considerations for Installing Sybase

12 VCS Enterprise Agnet for Sybase Installaion and Configuration Guide


Installing the Sybase Agent 3
This chapter describes how to install the Sybase agent in a VCS cluster. If you have an
earlier version of the agent installed, refer to Upgrading the Agent on page 15.
The VCS enterprise agent for Sybase is installed from the CD. You must install the SQL
Server and Backup Server agents on all the systems that will host the Sybase service
group.

Prerequisites
Install and configure VCS. VERITAS recommends installing the VCS graphical user
interface. If necessary, review the VERITAS Cluster Server Installation Guide.
Install and configure the application. If necessary, review the Sybase documentation.
Verify that the sybase account is valid and identical on all UNIX systems that will
run Sybase.
If a previous version of the agent is installed, uninstall it.

13
Installation Instructions

Installation Instructions
1. Log in as root.

2. Insert the CD into a drive connected to your system.


If you are running Solaris volume-management software, the software
automatically mounts the CD as /cdrom/cdrom0. Type the following command
to install the agent:
# cd /cdrom/cdrom0
# pkgadd -d .

If you are not running Solaris volume-management software, you must mount
the CD manually. For example:
# mount -F hsfs -o ro /dev/dsk/c0t6d0s2 /mnt
Where, in this example, /dev/dsk/c0t6d0s2 is the default for the CD drive.
# cd /mnt
# pkgadd -d .

Note Repeat steps 1 and 2 on each system that will become part of the Sybase service
group.

14 VCS Enterprise Agent for Sybase Installation and Configuration Guide


Upgrading the Agent

Upgrading the Agent


This section describes how to upgrade from the VCS enterprise agent 1.3.1 for Sybase in a
VCS cluster.

1. Save the VCS configuration and stop the VCS engine.


# haconf -dump -makero
# hastop -all -force

2. Follow step a through step c on all systems that have the Sybase agent installed.

a. Remove the Sybase agent


# pkgrm VRTSvcssy

b. Delete the file /etc/VRTSvcs/conf/config/SybaseTypes.cf.

c. Install the VCS enterprise agent 4.0 for Sybase. See Installation Instructions on
page 14.

3. Copy the file SybaseTypes.cf from the /etc/VRTSvcs/conf/ directory to


/etc/VRTSvcs/conf/config directory.

4. Verify the configuration.


# cd /etc/VRTSvcs/conf/config
#hacf -verify.

5. Start VCS on the local node first.

6. Start VCS on other nodes.

Chapter 3, Installing the Sybase Agent 15


Upgrading the Agent

16 VCS Enterprise Agent for Sybase Installation and Configuration Guide


Configuring the Agent 4
Configuring the VCS enterprise agent for Sybase involves creating the Sybase service
group, configuring its resources, and defining attribute values for the configured
resources. You must have administrator privileges to create and configure a service group.
You can configure the Sybase agent using two methods:
By using VCS Cluster Manager (Java Console) to edit a resource group template for
the Sybase agent. See Configuring the Agent Using Cluster Manager (Java Console)
on page 18).
By using the types configuration files and directly editing the sample main.cf file
supplied with the Sybase agent (see Configuring the Agent by Editing the
Configuration Files on page 20). This method requires that VCS be stopped and
restarted before the configuration takes effect.
Before you configure the agent, see Resource Type Definitions on page 31 to review the
tables that describe the Sybase resource types and their attributes. The resource type
definition files and the sample main.cf configurations are also shown for reference.

Prerequisites
Install and configure Sybase identically on all cluster systems. (For more information,
see Installing Sybase on page 9)
Verify that the Sybase agent is installed on all cluster systems. (For more information,
see Installing the Sybase Agent on page 13)

17
Configuring the Agent Using Cluster Manager (Java Console)

Configuring the Agent Using Cluster Manager (Java


Console)
A template for the Sybase resource groups is automatically installed on installation of the
Sybase enterprise agent. Using the VCS Cluster Manager (Java Console), you can view the
template, which displays the Sybase service group, its resources and their attributes. You
can dynamically modify the attributes values as necessary for your configuration.

Importing the SybaseTypes.cf File


To use the Sybase template, import the SybaseTypes.cf file to the VCS engine by using
Cluster Manager:

1. Start Cluster Manager.

2. Click on the File menu and select Import Types.

3. In the Import Types dialog box, select the file:


/etc/VRTSvcs/conf/sample_sybase/SybaseTypes.cf

4. Import the types file for Sybase.

5. Save the configuration.


At this point, the Sybase types have been imported to the VCS engine. The Sybase agent
can be configured without interrupting or stopping VCS.
For detailed information about using the VCS Cluster Manager, refer to the VERITAS
Cluster Server Users Guide.

18 VCS Enterprise Agent for Sybase Installation and Configuration Guide


Configuring the Agent Using Cluster Manager (Java Console)

Adding the Sybase Group Using the Wizard


If you have imported the SybaseTypes.cf file, you can download the SybaseGroup
template by starting the Service Group Configuration Wizard in Cluster Manager.

1. In Cluster Manager, click the service group configuration wizard icon on the toolbar.

2. Click Next on the wizard Welcome window.

a. Enter the service group name. In this instance, enter Sybase.

b. Select the systems on which the service group will run.

3. Confirm that you are basing the service group on a predefined template, and click
Next.

4. Select the Sybase template (SybaseGroup) from the list of templates, and click Next.

5. The wizard prompts you with alternate names in case the names in the template clash
with existing names. Make corrections as necessary and click Next.

6. When the wizard indicates that it is ready to create the service group, click Next. The
service group is dynamically created based on the Sybase template.

7. Review the service groups resource attributes, and modify the default values, if
necessary, in accord with your specific configuration.

Caution To create a secure password, see Setting the Sybase Password Attribute on
page 22.

Chapter 4, Configuring the Agent 19


Configuring the Agent by Editing the Configuration Files

Configuring the Agent by Editing the Configuration Files


The VCS enterprise agent for Sybase comes with a sample configuration file that can be
used as reference to directly modify your present configuration file. When you use this
method, you must restart VCS for the configuration to take effect.
Follow the instructions below to configure the agent using the sample configuration file:

1. Log in to System A as root.

2. Make a backup copy of the main.cf file:


# cd /etc/VRTSvcs/conf/config
# cp main.cf main.cf.orig

3. Copy the Sybase types configuration file into place:


# cp /etc/VRTSvcs/conf/sample_sybase/SybaseTypes.cf
/etc/VRTSvcs/conf/config/SybaseTypes.cf

4. Edit the main.cf file. Use the file /etc/VRTSvcs/conf/sample_sybase/main.cf


for reference:

a. Add an include line for the SybaseTypes.cf file:


include "SybaseTypes.cf"

b. Create the Sybase and SybaseBk resources. Refer to the examples shown under
Sybase Resource Type on page 31 and SybaseBk Resource Type on page 33.

c. Edit the default attributes to match the parameters in your configuration.

Caution From hagui or hares -display, the Sybase sa password is visible as the
attribute value SApswd. For added security, use SApswd to specify the name of
a file that stores the actual password. See Setting the Sybase Password
Attribute on page 22.

d. Assign dependencies to the newly created resources. Refer to the sample file
/etc/VRTSvcs/conf/sample_sybase/main.cf. (See the VERITAS Cluster
Server Users Guide for more information on assigning dependencies.)

5. Save and close the file.

6. Verify the syntax of the file /etc/VRTSvcs/conf/config/main.cf:


# hacf -verify config

20 VCS Enterprise Agent for Sybase Installation and Configuration Guide


Configuring the Agent by Editing the Configuration Files

7. Start the VCS engine:


# hastart

8. Verify that all Sybase service group resources are brought online:
# hagrp -state

9. Take the service group offline and verify that all resources are stopped:
# hagrp -offline service_group -sys system_name
# hagrp -state

10. Bring the service group online again and verify that all resources are available:
# hagrp -online service_group -sys system_name
# hagrp -state

11. Start the VCS engine on sysb:


# hastart

12. Switch the Sybase service group to sysb:


# hagrp -switch service_group -to sysb

13. Verify that all Sybase service group resources are brought online on sysb:
# hagrp -state

Chapter 4, Configuring the Agent 21


Configuring the Agent by Editing the Configuration Files

Setting the Sybase Password Attribute


From hagui or hares -display, the Sybase sa password is visible as the attribute
value SApswd. For added security, use SApswd to specify the name of a file that stores the
actual password in a single line. The file must have read access for the root user and be
present on all nodes where the service group can fail over.

1. To specify a filename for the SApswd attribute from the command line, enter:
# hares -modify Sybase SApswd "VCSSY: /sybase/secret"
# hares -modify SybaseBk SApswd "VCSSY: /sybase/secret"
where /sybase/secret is an example filename. The keyword VCSSY: (all
capitalized letters followed by a colon) must precede the actual name of the file
containing the password. Note that the attribute is modified for each resource type,
Sybase and SybaseBk.

2. Verify that the file has read access for the root user.

3. Repeat steps 1 and 2 on all systems to which the group can fail over.

Using a Soft Link to a $SYBASE Pathname


The Solaris process table limits process names to 79 characters. A process having a longer
pathname is truncated in the table, making it unrecognizable. The Sybase home directory
($SYBASE) could possibly have such a long pathname.
Using a soft link pathname avoids the problems posed by the long pathname. After
creating the soft link on each system, you must edit the following files, making the
appropriate substitutions:
The file RUN_Server in the directory $SYBASE/install.
The file RUN_Server_back in the directory $SYBASE/install.

22 VCS Enterprise Agent for Sybase Installation and Configuration Guide


Configuring the Agent by Editing the Configuration Files

Example: Replacing $SYBASE Pathname With a Soft Link

1. On each system in the cluster, create a soft link to the long pathname. For example:
# ln -s /opt/apps/sybase/home/directory/is/longer/than
eighty/characters/sybase /opt/link_to_longpath
Now the process will be invoked with the short pathname of the soft link.

2. In the $SYBASE/install directory, edit the two files RUN_Server and


RUN_Server_back. Find all instances of the long pathname and replace them with
the soft link.
Replace: /opt/apps/sybase/home/directory/is/longer/than/eighty
/characters/sybase with the soft link: /opt/link_to_longpath.
For example, the file RUN_Server resembles the following before the change:
/opt/apps/sybase/home/directory/is/longer/than/eighty
/characters/sybase/bin/dataserver\
-sfw17i\
-d/dev/vx/rdsk/db_dg1/vol2\
-e/opt/apps/sybase/home/directory/is/longer
/than/eighty/characters/sybase/install/fw17i.log\
-M/opt/apps/sybase/home/directory/is/longer/than/eighty
/characters/sybase\
After the replacement, the file resembles:
/opt/link_to_longpath/bin/dataserver\
-sfw17i\
-d/dev/vx/rdsk/db_dg1/vol2\
-e/opt/link_to_longpath/install/fw17i.log\
-M/opt/link_to_longpath\

Note Make sure the -s option and its argument (fw17i in the above example) are the
first to be listed; they must be placed within the first eighty characters of the file.

3. In the file /etc/VRTSvcs/conf/config/main.cf, edit the Home attribute for


both the Sybase type and the SybaseBk type (see Sybase Resource Type on page 31
and SybaseBk Resource Type on page 33)
For example:
Home = "/opt/link_to_longpath"

Chapter 4, Configuring the Agent 23


Modifying the Agent Configuration

Modifying the Agent Configuration


You can dynamically configure the VCS enterprise agent for Sybase using several
methods, including the Cluster Manager (Java Console), Cluster Manager (Web Console),
and the command line. See the VERITAS Cluster Server Users Guide for more information.

Database Tables
See the comment inside the $VCS_HOME/bin/Sybase/SqlTest.pl script to set up a
database table or to become an authenticated user.

Setting Up Detail Monitoring for Sybase Agent


The VCS enterprise agent for Sybase provides two levels of application monitoring:
primary (basic) and secondary (detail). Basic level monitors the Sybase daemon processes
to verify that they are continuously active.
Detail monitoring performs a transaction on a test table in the database to ensure that
Sybase is functioning properly. The agent uses the script defined in the attribute
Monscript of the Sybase resource. During detail monitoring, the agent tries to execute the
specified script. If the script successfully executes, the agent considers the database
available. You can customize the default script according to your configurations
To activate detail monitoring, the Sybase resource attributes User, Pword, Table, and
Monscript must not be empty (""). The attribute Monscript, which points to the
$VCS_HOME/bin/Sybase/SqlTest.pl script, must also exist and have execute
permission for root.

Modifying the Detail Monitoring Configuration

1. Make the VCS configuration writable:


# haconf -makerw

2. Set one attribute to an empty string to disable detail monitoring:


# hares -modify Sybase_resource UPword ""

3. Freeze the service group to avoid automated actions by VCS caused by incomplete
reconfiguration:
# hagrp -freeze service_group

4. Update the Sybase database monitor configuration:

24 VCS Enterprise Agent for Sybase Installation and Configuration Guide


Setting Up Detail Monitoring for Sybase Agent

# /opt/Sybase/bin/isql -S "Server"
-U "UserName" -P "Password"

Note The location of the executable isql varies by Sybase version. For Sybase 11.x, the
path is $SYBASE/bin. For Sybase 12.0, the path is $SYBASE/$SBYASE_OCS/bin.

5. To enable detail monitoring, change the UPword attribute to Password:


# hares -modifySybase_resource User user
# hares -modify Sybase_resource UPword Password
# hares -modify Sybase_resource Db Dbname
# hares -modify Sybase_resource Table Table
# hares -modify Sybase_resource Monscript
/opt/VRTSvcs/bin/Sybase/SqlTest.pl

6. Unfreeze and save the configuration:


# hagrp -unfreeze service_group

# haconf -dump [-makero]

Chapter 4, Configuring the Agent 25


Setting Up Detail Monitoring for Sybase Agent

26 VCS Enterprise Agent for Sybase Installation and Configuration Guide


Administering the Sybase Service Group 5
This chapter describes the administrative tasks you can perform on the Sybase service
group, including bringing the service group online, taking it offline, switching it, and
modifying the agent configuration. The chapter also describes how to disable the agent
and to remove it.

Bringing the Service Group Online


1. In the Cluster Explorer configuration tree, select the newly created service group.

2. Right-click the service group name, and select Enable Resources. This enables all the
resources in the group.

3. Right-click the service group name, and select the systems on which to enable the
service group (Right-click>Enable>system_name or Right-click>Enable>All).

4. Save your configuration (File>Close Configuration).

5. Right-click the service group and select to online the service group on the system
(Right-click>Online>system_name).

Taking the Service Group Offline


1. On the Service Groups tab of the Cluster Explorer configuration tree, right-click the
service group.
or
Select the cluster in the Cluster Explorer configuration tree, select the Service Groups
tab, and right-click the service group icon in the view panel.

2. Choose Offline, and choose the appropriate system from the pop-up menu
(Right-click>Offline>system_name).

27
Switching the Service Group

Switching the Service Group


The process of switching a service group involves taking it offline on its current sytem and
bringing it online on the another system

1. On the Service Groups tab of Cluster Explorer configuration tree, right-click the
service group.
or
Select the cluster in the Cluster Explorer configuration tree, select the Service Groups
tab, and right-click the service group icon in the view panel.

2. Choose Switch To, and choose the appropriate system from the pop-up menu
(Right-click>Switch To>system_name).

Viewing the Agent Log


The VCS enterprise agent for Sybase logs messages to the following files:
/var/VRTSvcs/log/engine_A.log
/var/VRTSvcs/log/Sybase_A.log
/var/VRTSvcs/log/SybaseBk_A.log

28 VCS Enterprise Agent for Sybase Installation and Configuration Guide


Disabling the Agent

Disabling the Agent


To disable the agent on a system, you must first take the Sybase service group offline. You
can stop the application completely, or switch the service group to another system.

1. Determine if the service group is online by entering:


# hagrp -state service_group -sys system_name

2. If the service group is online, take it offline by entering:


# hagrp -offline service_group -sys system_name
or
# hagrp -switch service_group -to system_name

3. Stop the agents on the system by entering:


# haagent -stop Sybase -sys <system_name>
# haagent -stop SybaseBk -sys <system_name>
When you get the message Please look for messages in the log file,
check the file /var/VRTSvcs/log/engine_A.log for a message confirming the
agent has stopped.
You can also use the ps command to confirm the agent is stopped.
You can remove the system, service group, or resource type from the VCS configuration
after disabling the agent on all systems. See the chapter on reconfiguring VCS from the
command line in the VERITAS Cluster Server Users Guide for more information.

Removing the Agent


Type the following command on each sytem to remove the agent. Answer prompts
accordingly:
#pkgrm VRTSvcssy

Chapter 5, Administering the Sybase Service Group 29


Removing the Agent

30 VCS Enterprise Agent for Sybase Installation and Configuration Guide


Resource Type Definitions A
This appendix lists resource type definitions and attribute definitions of the Sybase and
SybaseBk agents.
The resource type represents the VCS configuration definitions of the agent and specifies
how the agent is defined in the configuration file main.cf. The Attribute Definitions table
explains the attributes associated with the agent. The Required Attributes table lists the
attributes that must be configured for the agent to function properly.

Sybase Resource Type


type Sybase (
str Server
str Owner
str Home
str Version
str SA
str SApswd
str User
str UPword
str Db
str Table
str Monscript
static str ArgList[] = { Server, Owner, Home
Version, SA, SApswd, User, UPword, Db,
Table, Monscript }
)

31
Sybase Resource Type

Attribute Definitions

Required Type and Definition


Attributes Dimension

Server string-scalar The $DSQUERY ASE name. One supported per service
group.

Owner string-scalar Sybase user as defined owner of executables and


database files in /etc/passwd.

Home string-scalar The $SYBASE path to Sybase binaries and configuration


files.

Version string-scalar Version of Sybase ASE.

SA string-scalar Sybase database administrator. Connects to the ASE for


shutdown.

SApswd string-scalar Password of Sybase database administrator. Connects to


the ASE for shutdown.

Optional Type and Definition


Attributes Dimension

User string-scalar Internal database user. Connects to the ASE for


secondary monitoring.

UPword string-scalar Password for internal database-user authentication.

Db string-scalar Name of the database in which the table resides, used to


test the time stamp.

Table string-scalar Name of the table used for secondary monitoring.

Monscript string-scalar Pathname to a secondary monitor script provided for


in-depth monitoring; the default (shallow monitoring) is
to monitor the database PID only.
The pathname to the supplied secondary monitoring
script is $VCS_HOME/bin/Sybase/SqlTest.pl.

32 VCS Enterprise Agent for Sybase Installation and Configuration Guide


SybaseBk Resource Type

SybaseBk Resource Type


type SybaseBk (
str Server
str Owner
str Home
str Version
str Backupserver
str SA
str SApswd
static str ArgList[] = { Backupserver, Owner, Home,
Version, Server, SA, SApswd }
)

Attribute Definitions

Attributes Type and Definition


Dimension

Server string-scalar The $DSQUERY Backup Server name.

Owner string-scalar Sybase user as defined owner of executables and database


files in /etc/passwd.

Home string-scalar The $SYBASE path to Sybase binaries and configuration


files.

Version string-scalar Version of Sybase Backup Server.

Backupserver string-scalar The $BACKUP SYBASE Backup Server name.

SA string-scalar Sybase database administrator. Connects to the ASE for


shutdown.

SApswd string-scalar Password of Sybase database administrator. Connects to the


ASE for shutdown.

Appendix A, Resource Type Definitions 33


SybaseBk Resource Type

34 VCS Enterprise Agent for Sybase Installation and Configuration Guide


Sample Configuration B
This appendix describes a typical service group configured to monitor the state of Sybase
servers in a VCS cluster. The sample configuration graphically depicts the resource types,
resources, and resource dependencies within the service group. Review these
dependencies carefully before configuring the agent. For more information about these
resource types, see the VCS Bundled Agents Reference Guide.

35
Resource Dependency Graph

Resource Dependency Graph


The figure below illustrates the configurations dependency graph
:

SYBBK
SybaseBk

SQL
Sybase
sybasesrv
opt_Sybase
IP Volume Volume
Mount sybdatdg_master
sybdatdg_sybprocs
sybasedg_sybasevol

NIC Volume DiskGroup


sybdatdg
sybase_le0 sybasedg
DiskGroup

This configuration has two disk groups on which three volumes are created. One disk
group is for the Sybase server, and one is for the database. The mount resource requires
the Volume resource, which in turn requires the DiskGroup resource. The service group IP
address for the Sybase server is configured using the IP and NIC resource types. The
Sybase server can be started after each of these resources is brought online. The Backup
Server is started after the SQL Server.

Note If your configuration does not use VERITAS Volume Manager, use the
DiskReservation resource type to configure shared storage instead of DiskGroup
and Volume resource types.

36 VCS Enterprise Agent for Sybase Installation and Configuration Guide


Sample Configuration

Sample Configuration
include "types.cf"
include "SybaseTypes.cf"

cluster vcs (
)

system sysa

system sysb

group sybase (
SystemList = { sysa, sysb }
AutoStart = 1
AutoStartList = { sysa }
)

DiskGroup sybasedg (
DiskGroup = sybasedg
)

DiskGroup sybdatdg (
DiskGroup = sybdatdg
)

IP sybasesrv (
Device = le0
Address = "16.9.1.9"
)

Mount opt_Sybase (
MountPoint = "/opt/Sybase"
BlockDevice = "/dev/vx/dsk/sybasedg/ase1103"
FsckOpt = "-n"
FSType = vxfs
MountOpt = rw
)

NIC sybase_le0 (
Device = le0
NetworkType = ether
)

Sybase SQL (
Server = SYBASE
Owner = sybase

Appendix B, Sample Configuration 37


Sample Configuration

Home = "/opt/Sybase"
Version = sybase11
SA = sa
SApswd = sybase
User = abcd
UPword = xxxxxxx
Db = testdb1
Table = testtab
Monscript = "/opt/VRTSvcs/bin/Sybase/SqlTest.pl"
)

SybaseBk SYBBK (
Server = SYBASE
Owner = sybase
Home = "/opt/Sybase"
Version = sybase11
Backupserver = SYB_BACKUP
SA = sa
SApswd = sybase
)

Volume sybasedg_sybasevol (
Volume = ase1103
DiskGroup = sybasedg
)

Volume sybdatdg_master (
Volume = master_1103
DiskGroup = sybdatdg
)

Volume sybdatdg_sybprocs (
Volume = sysprocs_1103
DiskGroup = sybdatdg
)

SQL requires opt_Sybase


SQL requires sybasesrv
SQL requires sybdatdg_master
SQL requires sybdatdg_sybprocs
SYBBK requires SQL
opt_Sybase requires sybasedg_sybasevol
sybasedg_sybasevol requires sybasedg
sybasesrv requires sybase_le0
sybdatdg_master requires sybdatdg
sybdatdg_sybprocs requires sybdatdg

38 VCS Enterprise Agent for Sybase Installation and Configuration Guide


Index
A installing 14
Agent operations monitoring in detail 24
Backup server agent 3 supported software 1
SQL server agent 2 typical setup 5
Attribute definitions upgrading 15
Backup server agent 33
F
SQL server agent 32
Failover 4
B
M
Backup server agent
Monitoring options 4
attribute definitions 33
operations 3 O
resource type 33 Offlining service group 27
Backup server agent attributes Onlining service group 27
Backupserver 33 Operations
Home 33 Backup server agent 3
Owner 33 SQL server agent 2
SA 33 R
SApswd 33 Resource types
Server 33 Backup server agent 33
Version 33 SQL server agent 31
C S
Cluster manager 18 Sample configuration file 37
Configuration Service groups
sample 37 adding 19
typical setup 5 disabling 29
Configuration file 37 offlining 27
Configuring the agent onlining 27
by editing the configuration files 20 removing 29
using Cluster Manager (Java Console) 18 switching 28
D viewing log 28
Database tables 24 SQL server agent
Detail monitoring,setting up 24 attribute definitions 32
operations 2
E
resource type 31
Enterprise agents
SQL server agent attributes
about 2
Db 32
configuring using Cluster Manager 18
Home 32

39
Monscript 32 configuration in a cluster 5
Owner 32 database dbspaces 10
SA 32 directory on shared disks 10
SApswd 32 installation 10
Server 32 language settings 11
Table 32 long pathname limitations 10
UPword 32 password attribute 22
User 32 transparent TCP/IP failover 10
Version 32
W
Supported software 1
wizard 19
Switching service groups 28
Sybase

40 VCS Enterprise Agent for Sybase Installation and Configuration Guide

S-ar putea să vă placă și