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

Registering and Configuring the Sun Cluster HA for Sun Java System Application Server EE (HADB)

This procedure describes how to use the scrgadm command to register and configure the Sun Cluster HA for Sun Java System Application Server EE (HADB) as a resource mastered on multiple nodes at one time.


Note –

See “Tools for Data Service Resource Administration” in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for details about additional options that enable you to register and configure the data service.


To perform this procedure, you need the following information about your configuration.

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

Perform the following steps to complete your configuration. For an explanation of the extension properties, see Table 1–2.

  1. Become superuser on a cluster member.

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


    # scrgadm -a -t SUNW.hadb
    
  3. Create the resource group for the Sun Java System Application Server EE (HADB).


    # scrgadm -a -g resource_group \ 
    -y Maximum_primaries=nodes_in_rg \
    -y Desired_primaries=nodes_in_rg \
    -h nodelist
    
    -a

    Specifies that a resource group is to be created.

    -g resource_group

    Specifies the name of the resource group that is to be created.

    -y 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.

    -y 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.

    -h 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 will run Sun Java System Application Server EE (HADB). Use the scconf -p | less command to find the nodelist names.

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

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


      # scrgadm -a -j resource -g resource_group  -t SUNW.hadb \ 
      -x Confdir_list=config_directory_list \
      -x HADB_ROOT=install_directory \
      -x DB_name=database_name
      
      -a

      Specifies that a data service resource is to be created.

      -j resource

      Specifies that the resource you are creating is named 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.

      -x Confdir_list=config_directory_list

      Specifies the path to the configuration directory.

      -x HADB_ROOT=install_directory

      Specifies the installation directory.

      -x DB_name=database_name

      Specifies the name of the HADB database.

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


      # scrgadm -a -j resource -g resource_group  -t SUNW.hadb \ 
      -x Confdir_list=config_directory_list \
      -x HADB_ROOT=install_directory \
      -x DB_name=database_name \
      -x Auto_recovery=true \
      -x Auto_recovery_command=command \
      -x DB_password_file=password_file
      
      -x Auto_recovery=true

      Specifies that you are using the auto-recovery feature.

      -x 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.

      -x DB_password_file=password_file

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


      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.


    # scswitch -Z -g resource_group
    
    -Z

    Enables the resource and its monitor

    -g 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.


    # scstat -g
    # ps -ef
    
  7. To verify that you have correctly installed and configured Sun Cluster HA for HADB, run the following command.


    # hadbm status database_name --nodes
    

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

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


Example 1–1 Creating a SUNW.hadb Resource with Auto-recovery


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

In the previous example, the resource has the following characteristics: