Configuring the IBM AIX subsystem for Sybase Failover  Configuring resource groups in HACMP

Chapter 8: Configuring Adaptive Server for Failover on IBM AIX

Modifying the ASE_HA.sh script

The ASE_HA.sh script is used to start, stop, and monitor Adaptive Server in a high availability environment. Adaptive Server includes this script in the $SYBASE/$SYBASE_ASE/install directory. Make a copy of this script and modify it for your environment for both Adaptive Servers in the cluster. The modifications you make to the script depend on whether the script is for the primary or secondary companion. Each node must have a copy of this script at the same location (for example, both nodes have a copy of the script in /usr/u/sybase), and both copies must have read, write, and execute permissions for “root”. The easiest way to do this is to first modify both scripts on the same node, copy both the scripts to the other node, then set the appropriate permissions for the scripts on both nodes.

To modify the script for your environment:

  1. Change to the $SYBASE/$SYBASE_ASE/install directory.

  2. As “root”, copy ASE_HA.sh to the HACMP event handler script directory, usually /usr/sbin/cluster/events, and enter:

    RUNHA_<server_name>.sh
    

    where server_name is the Adaptive Server to be monitored.

  3. Login and password of the user with the sa_role and ha_role can be a normal string or an encrypted string.

    If you want to use the encrypted username and password the value of CIPHER is the encrypted string you get from the haisql utility (located in $SYBASE/$SYBASE_ASE/bin). Sybase recommends usage of “encrypted” login and password so the sensitive information in the file is well protected.

    To use haisql to generate the encrypted login string:

    1. Run haisql with no arguments to generate the encrypted string for a given login_name and password:

      $SYBASE/ASE-12_5/bin/haisql
      Enter Username: sa
      Enter Password:
      TWAS8n1jSF2gBsvayUlw97861.cyTKaS1YhavBRQ2qKcJwtx.TmFBarGS2Kl553WDR7g8m5vrf86t@K4CU62HEccm4zkeexsP9E=FeuvX
      
    2. Copy and then paste the encrypted string to the “ASE_HA.sh” script as the value for CIPHER.

    If you set CIPHER then the “ASE_HA.sh” script uses the encrypted login and password. Do not set HA_LOGIN and HA_PWD if CIPHER is set.

  4. You must edit the RUNHA_server_name.sh script for your environment. The original ASE_HA.sh script contains the variables listed below. Edit the lines that include “__FILL_IN__” (and any other lines that require editing) with the values for your site:

  5. Edit the script for the primary companion.

  6. Edit the script for the secondary companion. These values differ depending on whether you are using an asymmetric or a symmetric configuration.

    If this is an asymmetric setup, the values for PRIM_SERVER should be the same as SEC_SERVER (the name of the secondary companion). PRIM_HOST should be the same as SEC_HOST, and PRIM_SYBASE should be the same as SEC_SYBASE.

    If this is a symmetric setup, the values for the PRIM_SERVER, PRIM_HOST, PRIM_SYBASE, SEC_SERVER, SEC_HOST, and SEC_SYBASE in the secondary companion script are the opposite of what is set in the primary companion script.

NoteUse the installation instructions below for upgrading from ASE version 12.5.3 ESD #3 or earlier to 12.5.3 ESD #4 or above; the “ASE_HA.sh” script is used to start, stop, and monitor an Adaptive Server in a high availability environment. Adaptive Server includes this script in the $SYBASE/$SYBASE_ASE/install directory.

Make the following changes only if you want to use the encrypted username and password of the user with the sa_role and ha_role:

  1. Before copying the new “ASE_HA.sh” script make a backup of an existing script located in the HACMP event handler script directory, usually located in /usr/sbin/cluster/events.

  2. As root copy “ASE_HA.sh” from $SYBASE/$SYBASE_ASE/install directory to the HACMP event handler script directory /usr/sbin/cluster/events and name it:

    RUNHA_<server_name>.sh
    

    Where server_name is the Adaptive Server to be monitored.

The login and password for the user with the sa_role and ha_role can be a normal string or an encrypted string.If you want to use the encrypted username and password the value of CIPHER is the encrypted string you acquire from the haisql utility, located in $SYBASE/$SYBASE_ASE/bin. Sybase recommends you use an encrypted login and password so the sensitive information in the file is well protected.

To use haisql to generate the encrypted login string:

  1. Run haisql with no arguments to generate the encrypted string for a given login name and password.

  2. Copy and paste the encrypted string to the “ASE_HA.sh” script as the value for CIPHER.

If you set CIPHER then the script uses the encrypted login and password. Do not set HA_LOGIN and HA_PWD if CIPHER is set. Copy the other required changes from the earlier “ASE_HA.sh” script to the new “ASE_HA.sh” script.





Copyright © 2005. Sybase Inc. All rights reserved. Configuring resource groups in HACMP

View this book as PDF