Sun Cluster Data Service for Sun Java System Application Server EE (HADB) Guide for Solaris OS

ProcedureHow to Register and Configure Sun Cluster HA for Sun Java System Application Server EE (HADB)

Perform the following steps to complete your configuration.

  1. On a cluster member, become superuser or assume a role that provides solaris.cluster.admin RBAC authorization.

  2. Register the resource type for the Sun Java System Application Server EE (HADB).


    # clresourcetype register SUNW.hadb
    
  3. Create the resource group for the Sun Java System Application Server EE (HADB).


    # clresourcegroup create -n nodelist \
    -p Maximum_primaries=nodes_in_rg \
    -p Desired_primaries=nodes_in_rg resource_group
    
    -n nodelist

    Specifies a comma-separated subset of cluster nodes to run Sun Java System Application Server EE (HADB). If this option is omitted, all cluster nodes run Sun Java System Application Server EE (HADB). Use the clnode list command to find the node list names.

    -p Maximum_primaries=nodes_in_rg

    Specifies the maximum number of nodes on which the resource can start. You must specify the same number as the value of the Desired_primaries property.

    -p Desired_primaries=nodes_in_rg

    Specifies the desired number of nodes on which the resource can start. You must specify the same number as the value of the Maximum_primaries property.

  4. Create a resource for Sun Java System Application Server EE (HADB), either with or without auto-recovery.

    • If you do not require the auto-recovery feature, execute the following command.


      # clresource create -g resource_group -t SUNW.hadb \
      -p Confdir_list=config_directory_list \
      -p HADB_ROOT=install_directory \
      -p DB_name=database_name resource
      
      -g resource_group

      Specifies that the resource is to be added to the resource group named resource_group.

      -t SUNW.hadb

      Specifies the predefined resource type name.

      -p Confdir_list=config_directory_list

      Specifies the path to the configuration directory.

      -p HADB_ROOT=install_directory

      Specifies the installation directory.

      -p DB_name=database_name

      Specifies the name of the HADB database.

      The resource is created in the enabled state.

    • If you do want to use the auto-recovery feature, execute the following command.


      # clresource create -g resource_group -t SUNW.hadb \
      -p Confdir_list=config_directory_list \
      -p HADB_ROOT=install_directory \
      -p DB_name=database_name \
      -p Auto_recovery=TRUE \
      -p Auto_recovery_command=command \
      -p DB_password_file=password_file resource
      
      -p Auto_recovery=TRUE

      Specifies that you are using the auto-recovery feature.

      -p Auto_recovery_command=command

      Specifies the command to execute after the database recovery. This extension property is optional, regardless of the value of the Auto_recovery property.

      -p DB_password_file=password_file

      Specifies the file from which HADB reads the database password. See the Sun Java System Application Server documentation for the format and content of the password file.

      The resource is created in the enabled state.


      Note –

      The auto-recovery command and the database password file must both exist in the local file system on each node.


  5. Bring the resource group online.


    # clresourcegroup online resource_group
    
    resource_group

    Specifies the name of the application resource group that is being enabled.

  6. Verify that the resource group and HADB resource are online.


    # cluster status
    # ps -ef
    
  7. To verify that you have correctly installed and configured Sun Cluster HA for Sun Java System Application Server EE (HADB), run the following command.


    # hadbm status database_name --nodes
    

    The output should indicate that the database that you specified is running.


Example 2–1 Creating a SUNW.hadb Resource With Auto-Recovery

This example shows the creation of a SUNW.hadb resource with auto-recovery.

In this example the resource has the following characteristics:


clresource create -g hadb-rg -t SUNW.hadb \
-p Confdir_list=/etc/opt/SUNWhadb/dbdef/hadb  \
-p HADB_ROOT=/opt/SUNWappserver7/SUNWhadb/4 \
-p DB_name=hadb \
-p Auto_recovery=true \
-p Auto_recovery_command=/usr/local/etc/create-session-store \
-p DB_password_file=/usr/local/etc/hadb-password-file hadb-rs