Verifying high availability on Sun Cluster 3.0

Perform the following verification tests to make sure that you have correctly installed and configured the Adaptive Server high availability (HA) on the Sun Cluster 3.0.

The following steps assume that two Adaptive Server resource groups have been configured in asymmetric mode.

  1. Log in to the primary node for Adaptive Server resource group.

  2. Set the Adaptive Server environment variables: SYBASE, SYBASE_ASE, SYBASE_OCS, and so on. Environment variables are specified with the Environment_file extension property.

  3. Verify the Adaptive Server resource group is online:

    scstat -g
    
  4. Use isql to connect to the primary data server:

    isql -Usa -Ppassword -Sprimary-server-name
    >select name from sysdatabases
    >go
    >quit
    

    For example:

     isql -Usa -Ppassword -SMONEY1
    >select name from sysdatabases
    >go
    name
    ------------------------------
    master
    model
    sybsystemdb
    sybsystemprocs
    tempdb
    
    (5 rows affected)
    > quit 
    
  5. Switch the primary resource group to the secondary node. This is a simulated failover.

    scswitch -z -g primary-resource-group -h secondary-host
    

    For example:

    scswitch -z -g rg_MONEY1 -h node2
    
  6. Use isql to connect to the secondary data server and confirm that the databases in the primary data server have been taken over by the secondary data server and can be accessed.

    isql -Usa -Ppassword -Ssecondary-server-name
    >select name from sysdatabases
    >go
    >quit
    

    For example:

    isql -Usa -Ppassword -SPERSONNEL1
    >select name from sysdatabases
    >go
        name
        ------------------------------
        master
        master_companion
        model
        sybsystemdb
        sybsystemdb_companion
        sybsystemprocs
        sybsystemprocs_companion
        tempdb
    
        (8 rows affected)
    > quit
    
  7. Follow the instructions in the subsection “Failing back to the primary companion” to fail back the primary resource group.

  8. Use isql to connect to the primary data server and verify that databases in the primary data server have been taken over by the primary data server and can be accessed.

    isql -Usa -Ppassword -Sprimary-server-name
    >select name from sysdatabases
    >go
    >quit
    

    For example:

    isql -Usa -Ppassword -SMONEY1
    >select name from sysdatabases
    >go
         name
        ------------------------------
        master
        model
        sybsystemdb
        sybsystemprocs
        tempdb
    
        (5 rows affected)
    > quit