Sun Cluster 2.2 Software Installation Guide

6.2.5 How to Set Up Sun Cluster HA for Sybase

These are the high-level steps to set up Sun Cluster HA for Sybase:

These are the detailed steps to set up Sun Cluster HA for Sybase.

  1. Make entries for the names of all SQL Servers.

    You must include the server names associated with your databases in the /var/opt/sybase/sybtab file on all nodes running Sun Cluster HA for Sybase. You must keep this file current on all nodes running Sun Cluster HA for Sybase for a failover to succeed. Update the file manually as SQL Servers are added or removed.

    Entries in the /var/opt/sybase/sybtab file have the following format:

    sql_server:sybase_directory
    

    Note -

    The Sun Cluster HA for Sybase fault monitor does not monitor backup servers. Therefore, do not make separate entries for backup servers in the /var/opt/sybase/sybtab file.


  2. Log in with the user ID of the RUN_sqlserver file and start the SQL Server.

    If the SQL Server is not running already, start it with the following command:

    # startserver -f $SYBASE/install/RUN_sqlserver
    
  3. (Optional) Create a login and password to be used for fault monitoring.

    Create a Sybase login "new_login_name" with sa_role to start and stop the server.


    Note -

    Skip this stepif you want to use the sa login for fault monitoring.


    # isql -Usa -P -S sql_server_name
    	>sp_addlogin new_login_name, password
    	>go
     	>sp_role "grant", "sa_role", new_login_name
     	>go
     	>exit
  4. Verify the $SYBASE/interfaces file.

    If Sybase is installed on the local disks, verify that $SYBASE/interfaces refers to a logical host, not a physical host. If Sybase is installed on the multihost disks, verify that the interfaces file exists under /var/opt/sybase on the local disks and that it is identical to the file $SYBASE/interfaces on the multihost disks.


    Note -

    If you install the Sybase SQL server on the multihost disks (logical host), you must install the Sybase clients in the /var/opt/sybase directories on all nodes capable of mastering the disks. If you install the Sybase SQL server on the local disks, you do not need to install Sybase clients.


  5. Verify that Sun Cluster and the cluster daemon are installed and running on all nodes.

    # hastat
    

    If they are not running already, start them by using the scadmin startnode command.

  6. Register and activate Sun Cluster HA for Sybase using the hareg(1M) command.

    Run the hareg(1M) command on only one node.

    If the Sybase data service is not yet registered, use the hareg(1M) command to register it. To register the data service only on the logical host, include the -h option and supply the logical host name:

    # hareg -s -r sybase [-h logicalhost]

    If the cluster is running already, use the hareg(1M) command to activate the Sybase data service:

    # hareg -y sybase
    
  7. Bring Sybase under control of Sun Cluster HA for Sybase using the following command.

    # hasybase insert sqlserver logicalhost 60 10 120 300 user/password \
     $SYBASE/install/RUN_sqlserver backupserver $SYBASE/install/RUN_backupserver
    

    The above command line includes the following:

    • hasybase insert - Command and subcommand

    • sqlserver - Name of the SQL Server

    • logicalhost - Logical host serving sql_server (not the physical host)

    • -60 -10 -120 -300 - Parameters which specify a probe cycle time of 60 seconds, a connectivity probe cycle count of 10 seconds, a probe timeout of 120 seconds, and a restart delay of 300 seconds

    • user/password - Login name created in Step 3 and password to be used for fault monitoring

    • $SYBASE/install/RUN_sqlserver - File used to start the SQL Server

    • backupserver (optional) - Name of the backup server

    • $SYBASE/install/RUN_backupserver (optional) - File used to start the backup server

    See the hasybase(1M) man page for details on all options to hasybase(1M).

  8. Bring the Sybase Server into service.

    Bring the SQL Server into service by running the hasybase(1M) command. Monitoring for that SQL Server will start automatically. See the hasybase(1M) man page for additional details.

    # hasybase start sql_server
    

    Note -

    If you did not start the Sybase SQL Server before issuing the hasybase(1M) command, then issuing it now will cause Sun Cluster to start the SQL Server.