Verifying the active-passive configuration

Perform the following tests to make sure you have correctly installed and configured the Adaptive Server for active-passive high availability on Sun Cluster.

  1. Bring the resource group online on its primary node and enable all resources and their fault monitors in the resource group. For example:

    scswitch -Z -g rg_MONEY
    
  2. Make sure clients such as isql connect to Adaptive Server using the logical host. To verify client connection failover, connect to Adaptive Server. Use isql to establish the high availability connection (modify the interfaces file to self-reference the hafailover entry, if necessary).

  3. isql -Usa -Ppassword -SMONEY -Q
    1> select @@servername
    2> go
    
    ------------------------------
    MONEY
    
    (1 row affected)
    
  4. Simulate fail over, either by shutting down the server:

    isql -Usa -Ppassword -SMONEY
    1> shutdown with nowait
    2> go
    

    Or by relocating the Adaptive Server resource group to the secondary node:

    scswitch -z -h node2 -g rg_MONEY
    
  5. Check the connection failover by issuing the following in the isql session started in step 2:

    1> select @@servername
    2> go
    
    CT-LIBRARY error:
             ct_results(): user api layer: internal Client Library error:
    HAFAILOVER:Trying to connect to MONEY server.
    1> select @@servername
    2> go
    ------------------------------
    MONEY
    
    (1 row affected)
    
  6. Simulate a failback by relocating the resource group back to the primary node.

    scswitch -z -h node1 -g rg_MONEY
    
  7. Check connection failover by issuing this command in the isql session started in step 2:

    1> select @@servername
    2> go
    
    CT-LIBRARY error:
             ct_results(): user api layer: internal Client Library error:
    HAFAILOVER:Trying to connect to MONEY server.
    1> select @@servername
    2> go
    ------------------------------
    MONEY
    
    (1 row affected)