Sun Cluster 3.0 U1 Data Services Installation and Configuration Guide

Chapter 10 Installing and Configuring Sun Cluster HA for Sybase ASE

This chapter provides instructions on how to configure and administer the Sun Cluster HA for Sybase ASE data service on your Sun Cluster nodes.

This chapter contains the following procedures.

You must configure the Sun Cluster HA for Sybase ASE data service as a failover service. See the Sun Cluster 3.0 U1 Concepts document and Chapter 1, Planning for Sun Cluster Data Services for general information about data services, resource groups, resources, and other related topics.

Installing and Configuring Sun Cluster HA for Sybase ASE

The following table lists sections that describe the installation and configuration tasks.

Table 10-1 Task Map: Installing and Configuring Sun Cluster HA for Sybase ASE

Task 

For Instructions, Go To 

Prepare to install the Sun Cluster HA for Sybase ASE data service 

"Preparing to Install Sun Cluster HA for Sybase ASE"

Install the Sybase ASE 12.0 software 

"Installing the Sybase ASE 12.0 Software"

Create the Sybase database environment 

"Creating the Sybase ASE Database Environment"

Install the Sun Cluster HA for Sybase ASE package 

"Installing the Sun Cluster HA for Sybase ASE Package"

Register Sun Cluster HA for Sybase ASE resource types and configure resource groups and resources 

"Registering and Configuring Sun Cluster HA for Sybase ASE"

Verify the Sun Cluster HA for Sybase ASE installation 

"Verifying the Sun Cluster HA for Sybase ASE Installation"

Understand Sun Cluster HA for Sybase ASE logging and security issues 

"Understanding Sun Cluster HA for Sybase ASE Logging and Security Issues"

Configure Sun Cluster HA for Sybase ASE extension properties 

"Configuring Sun Cluster HA for Sybase ASE Extension Properties"

View fault-monitor information 

"Sun Cluster HA for Sybase ASE Fault Monitor"

Preparing to Install Sun Cluster HA for Sybase ASE

To prepare Sun Cluster nodes for the Sun Cluster HA for Sybase Adaptive Server 12.0 installation, select an installation location for the following files.

Installing the Sybase ASE 12.0 Software

Use the procedures in this section to complete the following tasks.


Note -

Before you configure the Sun Cluster HA for Sybase ASE data service, use the procedures that the Sun Cluster 3.0 U1 Installation Guide describes to configure the Sun Cluster software on each node.


How to Prepare the Nodes

This procedure describes how to prepare the cluster nodes for Sybase ASE software installation.


Caution - Caution -

Perform all steps in this procedure on all Sun Cluster nodes. If you do not perform all steps on all nodes, the Sybase ASE installation will be incomplete, and the Sun Cluster HA for Sybase ASE data service will fail during startup.



Note -

Consult the Sybase ASE documentation before you perform this procedure.


  1. Become superuser on all nodes.

  2. Configure the /etc/nsswitch.conf file as follows so that the Sun Cluster HA for Sybase ASE data service starts and stops correctly if a switchover or failover occurs.

    On each node that can master the logical host that runs the Sun Cluster HA for Sybase ASE data service, include one of the following entries for group in the /etc/nsswitch.conf file.


    group:
    group:
    group: files [NOTFOUND=return] nis
    group: file [NOTFOUND=return] nisplus

    The Sun Cluster HA for Sybase ASE data service uses the su user command to start and stop the database node. The user is typically sybase_id. The network information name service might become unavailable when a cluster node's public network fails. Adding one of the preceding entries for group ensures that the su(1M) command does not refer to the NIS/NIS+ name services if the network information name service is unavailable.

  3. Configure the cluster file system for the Sun Cluster HA for Sybase ASE data service.

    If raw devices contain the databases, configure the global devices for raw-device access. See the Sun Cluster 3.0 U1 Installation Guide for information on how to configure global devices.

    If you use the Solstice DiskSuite volume manager, configure the Sybase ASE software to use UNIX file system (UFS) logging or raw-mirrored metadevices. See the Solstice DiskSuite documentation for information on how to configure raw-mirrored metadevices.

  4. Prepare the SYBASE_HOME directory on a local or multihost disk.


    Note -

    If you install the Sybase ASE binaries on a local disk, use a separate disk if possible. Installing the Sybase ASE binaries on a separate disk prevents the binaries from overwrites during operating environment reinstallation.


  5. On each node, create an entry for the database administrator (DBA) group in the /etc/group file, and add potential users to the group.

    You typically name the DBA group dba. Verify that the root and sybase_id users are members of the dba group, and add entries as necessary for other DBA users. Make sure that group IDs are the same on all nodes that run the Sun Cluster HA for Sybase ASE data service, as the following example illustrates.


    dba:*:520:root,sybase_id

    You can create group entries in a network name service. If you do so, also add your entries to the local /etc/inet/hosts file to eliminate dependency on the network name service.

  6. On each node, create an entry for the Sybase system administrator.

    You typically name the Sybase system administrator sybase_id. The following command updates the /etc/passwd and /etc/shadow files with an entry for the Sybase system administrator.


    # useradd -u 120 -g dba -d /Sybase-home sybase_id
    

    Make sure that the sybase_id user entry is the same on all nodes that run the Sun Cluster HA for Sybase ASE data service.

How to Install the Sybase Software

Perform the following steps to install the Sybase ASE software.

  1. Become superuser on a cluster member.

  2. Note the Sybase ASE installation requirements.

    You can install Sybase ASE binaries on one of the following locations.

    • Local disks of the cluster nodes

    • Cluster file system


      Note -

      Before you install the Sybase ASE software on the cluster file system, start the Sun Cluster software and become the owner of the disk device group.


    See "Preparing to Install Sun Cluster HA for Sybase ASE" for more information about installation locations.

  3. Create a failover resource group to hold the network and application resources.


    # scrgadm -a -g resource-group [-h nodelist]
    -g resource-group

    Specifies the name of the resource group. This name can be your choice but must be unique for resource groups within the cluster.

    -h nodelist

    Specifies an optional, comma-separated list of physical node names or IDs that identify potential masters. The order here determines the order in which the Resource Group Manager (RGM) considers primary nodes during failover.


    Note -

    Use the -h option to specify the order of the node list. If all the nodes in the cluster are potential masters, you do not need to use the -h option.


  4. Verify that you have added all logical hostnames that the Sun Cluster HA for Sybase ASE data service uses to either the /etc/inet/hosts file or to your name-service (NIS, NIS+) database.

  5. Add a logical hostname to the failover resource group.


    # scrgadm -a -L -g resource-group -l logical-hostname \ 
    [-j resource] [-n netiflist] 
    -l logical-hostname

    Specifies a logical hostname. The logical hostname is the network interface (IP address) that clients use to access the Sun Cluster HA for Sybase ASE data service.

    -j resource

    Specifies an optional name for the logical-hostname resource. If you do not specify a name, the default resource name appears as the first name after the -l option.

    -n netiflist

    Specifies an optional comma-separated list that identifies the NAFO groups on each node. The netiflist must represent all nodes in the resource group's nodelist. If you do not specify this option, the scrgadm command attempts to discover a network adapter on the subnet that the hostnamelist identifies for each nodelist node.

  6. Login as sybase_id.

  7. Install the Sybase ASE software.

    Regardless of where you install the Sybase ASE software, modify each node's /etc/system files as you would in standard Sybase ASE installation procedures. For instructions on installing Sybase ASE software, refer to the Sybase installation and configuration guides.


    Note -

    For every Sybase server, enter the logical hostname when asked to specify its name.


Where to Go From Here

After you install the Sybase ASE software, go to "How to Configure Sybase ASE Database Access With Solstice DiskSuite" if you use the Solstice DiskSuite volume manager. Go to "How to Configure Sybase ASE Database Access With VxVM" if you use the VERITAS Volume Manager (VxVM).

How to Verify the Sybase ASE Installation

Perform the following steps to verify the Sybase ASE software installation.

  1. Verify that the sybase_id user and the dba group own the $SYBASE_HOME directory and $SYBASE_HOME children directories.

  2. Run the scstat(1M) command to verify that the Sun Cluster software functions correctly.

Creating the Sybase ASE Database Environment

The procedures in this section enable you to complete the following tasks.

How to Configure Sybase ASE Database Access With Solstice DiskSuite

If you use the Solstice DiskSuite volume manager, perform the following steps to configure Sybase ASE database access with the Solstice DiskSuite volume manager.

  1. Configure the disk devices for the Solstice DiskSuite software to use.

    See the Sun Cluster 3.0 U1 Installation Guide for information on how to configure Solstice DiskSuite.

  2. If you use raw devices to contain the databases, run the following commands to change each raw-mirrored metadevice's owner, group, and mode.

    If you do not use raw devices, do not perform this step.

    1. If you create raw devices, run the following commands for each device on each node that can master the Sybase ASE resource group.


      # chown sybase_id /dev/md/metaset/rdsk/dn
      # chgrp dba_id /dev/md/metaset/rdsk/dn
      # chmod 600 /dev/md/metaset/rdsk/dn
      
      metaset

      Specifies the name of the diskset.

      /rdsk/dn

      Specifies the name of the raw disk device within the metaset diskset.

    2. Verify that the changes are effective.


      # ls -lL /dev/md/metaset/rdsk/dn
      

How to Configure Sybase ASE Database Access With VxVM

If you use VxVM software, perform the following steps to configure Sybase ASE database access with the VxVM software.

  1. Configure the disk devices for the VxVM software to use.

    See the Sun Cluster 3.0 U1 Installation Guide for information on how to configure VERITAS Volume Manager.

  2. If you use raw devices to contain the databases, run the following commands on the current disk-group primary to change each device's owner, group, and mode.

    If you do not use raw devices, do not perform this step.

    1. If you create raw devices, run the following command for each raw device.


      # vxedit -g diskgroup set user=sybase_id group=dba_id mode=0600 volume
      
      diskgroup

      Specifies the name of the disk group.

      volume

      Specifies the name of the volume within the disk group.

    2. Verify that the changes are effective.


      # ls -lL /dev/vx/rdsk/diskgroup/volume
      
    3. Reregister the disk device group with the cluster to keep the VxVM namespace consistent throughout the cluster.


      # scconf -c -D name=diskgroup
      

How to Create the Sybase ASE Database Environment

Before you perform this procedure, ensure that you have completed the following tasks.


Note -

The Sun Cluster software supports only the Sybase ASE 12.0 Base 32-bit configuration.


Perform the following steps to create the Sybase ASE database environment.

  1. Run the GUI-based utility srvbuild to create the Sybase ASE database.

    The $SYBASE/ASE_12-0/bin directory contains this utility. See the Sybase ASE document entitled "Installing Sybase Adaptive Server Enterprise on Sun Solaris 2.x (SPARC)."

  2. To verify successful database installation, make sure that all servers start correctly.

    Run the ps(1) command to verify the operation of all servers. Sybase ASE server logs indicate any errors that have occurred.

  3. Set the password for the Sybase ASE system administrator account.

    See the Sybase Adaptive Server Enterprise System Administration Guide for details on changing the "sa" login password.

  4. Create a new Sybase ASE account for fault monitoring.

    This account enables the fault monitor to perform the following tasks.

    • Support queries to system tables.

    • Create and update user tables.


    Note -

    Do not use the sa account for these purposes.


    See "Sun Cluster HA for Sybase ASE Fault Monitor" for more information.

  5. Update the stop file with the sa password.

    Because the stop file contains the sa password, protect the file with the appropriate permissions, and place the file in a directory that the system administrator chooses. Enable only the sybase_id user to read, write, and execute the stop file.


    Note -

    If you set up another Sybase ASE configuration on the same cluster, do not use sybase_id as the user ID for the additional configuration.


    See "Important Security Issues" for more information about the stop file.

Where to Go From Here

After you create the Sybase ASE database environment, go to "How to Install Sun Cluster HA for Sybase ASE Packages".

Installing the Sun Cluster HA for Sybase ASE Package

You can use the scinstall(1M) utility to install SUNWscsyb, the Sun Cluster HA for Sybase ASE data-service package, on a cluster. Do not use the -s option to non-interactive scinstall to install all data-service packages.

If you installed the SUNWscsyb data-service package as part of your initial Sun Cluster installation, proceed to "Registering and Configuring Sun Cluster HA for Sybase ASE". Otherwise, use the following procedure to install the SUNWscsyb package.

How to Install Sun Cluster HA for Sybase ASE Packages

You need the Sun Cluster Agents CD to complete this procedure. Perform this procedure on all cluster nodes that run the Sun Cluster HA for Sybase ASE package.

  1. Load the Agents CD into the CD-ROM drive.

  2. Run the scinstall utility with no options.

    This step starts the scinstall utility in interactive mode.

  3. Select the Add Support for New Data Service to This Cluster Node menu option.

    This option enables you to load software for any data services that exist on the CD.

  4. Exit the scinstall utility.

  5. Unload the CD from the drive.

Where to Go From Here

When you finish the Sun Cluster HA for Sybase ASE package installation, go to "How to Register and Configure Sun Cluster HA for Sybase ASE".

Registering and Configuring Sun Cluster HA for Sybase ASE

Use the procedures in this section to complete the following tasks.

How to Register and Configure Sun Cluster HA for Sybase ASE

This procedure describes how to use the scrgadm(1M) command to register and configure the Sun Cluster HA for Sybase ASE data service.


Note -

Other options also enable you to register and configure the data service. See "Tools for Data-Service Resource Administration" for details about these options.


To perform this procedure, you must have the following information.


Note -

Perform the following steps on one cluster member.


  1. Become superuser on a cluster member.

  2. Run the scrgadm command to register resource types for the Sun Cluster HA for Sybase ASE data service.


    # scrgadm -a -t SUNW.sybase
    

    -a

    Adds the resource type for the data service.

    -t SUNW.sybase

    Specifies the resource-type name that is predefined for your data service.

  3. Create Sybase ASE application resources in the failover resource group.


    # scrgadm -a -j resource -g resource-group \
    -t SUNW.sybase \
    -x Environment_File=environment-file-path \
    -x Adaptive_Server_Name=adaptive-server-name \
    -x Backup_Server_Name=backup-server-name \
    -x Text_Server_Name=text-server-name \
    -x Monitor_Server_Name=monitor-server-name \
    -x Adaptive_Server_Log_File=log-file-path \
    -x Stop_File=stop-file-path \
    -x Connect_string=user/passwd \
    
    -j resource

    Specifies the resource name to add.

    -g resource-group

    Specifies the resource-group name into which the RGM places the resources.

    -t SUNW.sybase

    Specifies the resource type to add.

    -x Environment_File=environment-file

    Sets the environment-file name.

    -x Adaptive_Server_Name=adaptive-server-name

    Sets the adaptive-server name.

    -x Backup_Server_Name=backup-server-name

    Sets the backup-server name.

    -x Text_Server_Name=text-server-name

    Sets the text-server name.

    -x Monitor_Server_Name=monitor-server-name

    Sets the monitor-server name.

    -x Adaptive_Server_Log_File=log-file-path

    Sets the path to the log file for the adaptive server.

    -x Stop_File=stop-file-path

    Sets the path to the stop file.

    -x Connect_string=user/passwd

    Specifies the user name and password that the fault monitor uses to connect to the database.

    You do not have to specify extension properties that have default values. See "Configuring Sun Cluster HA for Sybase ASE Extension Properties" for more information.

  4. Run the scswitch(1M) command to complete the following tasks.

    • Enable the resource and fault monitoring.

    • Move the resource group into a managed state.

    • Bring the resource group online


    # scswitch -Z -g resource-group
    
    .

How to Configure the SUNW.HAStorage Resource Type

The SUNW.HAStorage resource type synchronizes actions between HA storage and the Sun Cluster HA for Sybase ASE data service. The Sun Cluster HA for Sybase ASE data service is disk intensive, and therefore you should configure the SUNW.HAStorage resource type.

See the SUNW.HAStorage(5) man page and "Relationship Between Resource Groups and Disk Device Groups" for more information about the SUNW.HAStorage resource type. See "How to Set Up SUNW.HAStorage Resource Type for New Resources" for the procedure on how to configure the SUNW.HAStorage resource type.

Where to Go From Here

After you register and configure the Sun Cluster HA for Sybase ASE data service, go to "How to Verify the Sun Cluster HA for Sybase ASE Installation ".

Verifying the Sun Cluster HA for Sybase ASE Installation

Perform the following verification tests to make sure that you have correctly installed and configured the Sun Cluster HA for Sybase ASE data service.

These sanity checks make sure that all nodes that run the Sun Cluster HA for Sybase ASE data service can start the Sybase ASE data server. These checks also ensure that other nodes in the configuration can access the Sybase ASE data server. Perform these sanity checks to isolate any problems with starting the Sybase ASE software from the Sun Cluster HA for Sybase ASE data service.

How to Verify the Sun Cluster HA for Sybase ASE Installation

  1. Log in to the node monitoring the Sybase ASE resource group.

  2. Set the Sybase ASE environment variables.

    The environment variables are the variables you specify with the Environment_file extension property. You typically name these variables SYBASE.sh.

  3. Verify that the Sun Cluster HA for Sybase ASE resource is online.


    # scstat -g
    
  4. Inspect the Sybase ASE logs to determine the cause of any errors that have occurred.

  5. Confirm that you can connect to the data server and execute the following test command.


    # isql -S adaptive-server -U sa
    
    isql> sp_help
    isql> go
    isql> quit
    

  6. Kill the process for the Sybase ASE data server.

    The Sun Cluster software restarts the process.

  7. Switch the resource group that contains the Sybase ASE resource to another cluster member.


    # scswitch -z -g resource-group -h node
    

  8. Log in to the node that now contains the resource group.

  9. Repeat Step 3 and Step 5.


    Note -

    Sybase ASE client connections cannot survive a Sun Cluster HA for Sybase ASE switchover. If a switchover occurs, the existing client connections to Sybase ASE terminate, and clients must reestablish their connections. After a switchover, the time that is required to replay the Sybase ASE transaction log determines Sun Cluster HA for Sybase ASE recovery time.


Understanding Sun Cluster HA for Sybase ASE Logging and Security Issues

The following sections contain information about Sun Cluster HA for Sybase ASE logging and security issues.

Sun Cluster HA for Sybase ASE Logging

The Sun Cluster HA for Sybase ASE data service logs messages to the file message_log in the /opt/SUNWscsyb/log directory. Although this file cannot exceed 512 Kbytes, the Sun Cluster HA for Sybase ASE data service does not delete old log files. The number of log files, therefore, can grow to a large number.

The Sun Cluster HA for Sybase ASE data service writes all error messages in the syslog file. The Sun Cluster HA for Sybase ASE data service also logs fault-monitor history to the file restart_history in the log directory. These files can also grow to a large number.

As part of your regular file maintenance, check the following log files and remove files that you no longer need.

Important Security Issues

The Sun Cluster HA for Sybase ASE data service requires that you embed the system administrator's password in a stop file. The /opt/SUNWscsyb directory contains the template for the stop file, Sybase_stop_servers. The Sun Cluster HA for Sybase ASE data service uses this file to log in to the Sybase ASE environment and to stop the Sybase ASE servers. Enable the sybase_id user to execute the stop file, but protect the file from general access. Give read, write, and execute privileges to only the following users.

Configuring Sun Cluster HA for Sybase ASE Extension Properties

This section describes how to configure Sun Cluster HA for Sybase ASE extension properties. Typically, you use the command line scrgadm -x parameter=value to configure extension properties when you create the Sybase ASE resources. You can also use the procedures described in Chapter 11, Administering Data-Service Resources to configure them later.

See the r_properties(5) and the rg_properties(5) man pages for details on all Sun Cluster extension properties.

Table 10-2 describes the extension properties that you can set for the Sybase ASE server resource. You can update some extension properties dynamically. You can update others, however, only when you create or disable a resource. The Tunable column in the following table indicates when you can update each property.

Table 10-2 Sun Cluster HA for Sybase ASE Extension Properties

Name/Data Type 

Default 

Range 

Tunable 

Description 

Environment_File

None 

Minimum=1

When disabled 

File that contains all Sybase ASE environment variables. 

Adaptive_Server_Name

None 

Minimum=1

When disabled 

Data-server name. The Sun Cluster HA for Sybase ASE data service uses this property to locate the RUN server in the $SYBASE/$ASE/install directory.

Backup_Server_Name

Null

 

When disabled 

Backup-server name. The Sun Cluster HA for Sybase ASE data service uses this property to locate the RUN server in the $SYBASE/$ASE/install directory. If you do not set this property, the Sun Cluster HA for Sybase ASE data service will not manage the server.

Monitor_Server_Name

Null

 

When disabled 

Monitor-server name. The Sun Cluster HA for Sybase ASE data service uses this property to locate the RUN server in the $SYBASE/$ASE/install directory. If you do not set this property, the Sun Cluster HA for Sybase ASE data service will not manage the server.

Text_Server_Name

Null

 

When disabled 

Text-server name. The Sun Cluster HA for Sybase ASE data service uses this property to locate the RUN server in the $SYBASE/$ASE/install directory. If you do not set this property, the Sun Cluster HA for Sybase ASE data service will not manage the server.

Adaptive_Server_Log_ File

None 

Minimum=1

When disabled 

The Sybase ASE data-server log. The Sun Cluster HA for Sybase ASE data service continually reads this property for error monitoring.  

Stop_File

None 

Minimum=1

When disabled 

The Sun Cluster HA for Sybase ASE data service uses this property during server stoppages. This property contains the sa password. Protect this property from general access.

Probe_timeout

30 seconds

1 - 99999 seconds

Any time 

Time-out value for the fault-monitor probe. 

Debug_level

0

0 - 15

Any time 

Debug level for writing to the Sun Cluster HA for Sybase ASE log. 

Connect_string

None 

Minimum=1

When disabled 

String of format user/password. The Sun Cluster HA for Sybase ASE data service uses this property for database probes.

Connect_cycle

5

1 - 100

Any time 

Number of fault-monitor probe cycles before the Sun Cluster HA for Sybase ASE data service establishes a new connection. 

Wait_for_online

FALSE

TRUE - FALSE

Any time 

Whether the start method waits for the database to come online before exiting. 

Sun Cluster HA for Sybase ASE Fault Monitor

The Sun Cluster HA for Sybase ASE fault monitor queries the Sybase ASE server to determine server health.

The fault monitor consists of the following processes.

The following sections describe the Sun Cluster HA for Sybase ASE fault-monitor processes and the extension properties that the fault monitor uses.

Main Fault-Monitor Process

The fault-monitor process diagnoses errors and checks statistics. The monitor labels an operation successful if the following conditions occur.

If an operation fails, the main process checks the action table for an action to perform and then performs the predetermined action. If an operation fails, the main process can perform the following actions, which execute external programs as separate processes in the background.

The server fault monitor also scans the Adaptive_Server_Log file and acts to correct any errors that the scan identifies.

Database-Client Fault Probe

The database-client fault probe performs activity checks and test transactions. The extension property Connect_string specifies an account that performs all database operations. The extension property Probe_timeout sets the time-out value that the probe uses to determine time that has elapsed in a successful database probe.

Extension Properties

The fault monitor uses the following extension properties.

See "Configuring Sun Cluster HA for Sybase ASE Extension Properties" for more information about these extension properties.