Sun Cluster Data Service for Oracle Application Server Guide for Solaris OS

Installing and Configuring Sun Cluster HA for Oracle Application Server

This chapter explains how to install and configure Sun Cluster HA for Oracle Application Server.

This chapter contains the following sections.

Installing and Configuring Sun Cluster HA for Oracle Application Server

Table 1 lists the tasks for installing and configuring Sun Cluster HA for Oracle Application Server. Perform these tasks in the order that they are listed.

Table 1 Task Map: Installing and Configuring Sun Cluster HA for Oracle Application Server

Task 

For Instructions, Go To 

Plan the installation. 

Sun Cluster HA for Oracle Application Server Overview

Planning the Sun Cluster HA for Oracle Application Server Installation and Configuration

Install and configure Sun Cluster. 

How to Install and Configure Sun Cluster

Verify installation and configuration. 

How to Verify the Installation and Configuration of Sun Cluster

Install Sun Cluster HA for Oracle Application Server Packages. 

How to Install the Sun Cluster HA for Oracle Application Server Packages using the scinstall Utility

Register and Configure Sun Cluster HA for Oracle Application Server. 

How to Register and Configure Sun Cluster HA for Oracle Application Server as a Failover Service

Verify Sun Cluster HA for Oracle Application Server Installation and Configuration. 

How to Verify the Sun Cluster HA for Oracle Application Server Installation and Configuration

Understand Sun Cluster HA for Oracle Application Server fault monitor. 

Understanding the Sun Cluster HA for Oracle Application Server Fault Monitor

Debug Sun Cluster HA for Oracle Application Server. 

Debug Sun Cluster HA for Oracle Application Server

Sun Cluster HA for Oracle Application Server Overview

The Sun Cluster HA for Oracle Application Server can be used to provide high availability for either the Oracle 9iAS Infrastructure or Oracle 10g AS Infrastructure.

Oracle 9iAS (version 9.0.2 and 9.0.3) and Oracle 10g AS (version 9.0.4) introduced a new component called “Oracle Infrastructure”. This infrastructure component provides centralized product metadata, security and management services, configuration information, and data repositories for middle tier installations.

The Sun Cluster HA for Oracle Application Server data service provides high availability for either the Oracle 9iAS Infrastructure or the Oracle 10g AS Infrastructure components. Additionally the Sun Cluster HA for Oracle is also required to provide high availability for the Oracle Database.

Table 2 Sun Cluster Architecture

Middle Tier 

Infrastructure Tier 

Database Tier 

Oracle HTTP Server (OHS) 

Oracle HTTP Server (OHS) 

Metadata Repository  

J2EE Server (OC4J) 

J2EE Server (OC4J) 

 

 

LDAP Server (OID) 

 

 

Enterprise Manager (EM) 

 

The middle tier may be installed on multiple nodes to achieve high availability, however the infrastructure tier and database tier are installed onto one node and require more than one Sun Cluster Data Service to manage the infrastructure (requires the Sun Cluster HA for Oracle Application Server data service) and database tier (requires the Sun Cluster HA for Oracle data service).


Note –

The middle tier components listed in Table 2 only refer to those components installed through an Oracle Application Server installation. There are other Oracle Applications that qualify as middle tier compoenents, however these are not listed here.


Table 3 lists the Oracle 9iAS Infrastructure services and how they are managed by the Oracle components, which are then managed by the Sun Cluster HA for Oracle Application Server.

Table 3 Oracle 9iAS Infrastructure Components

Services 

Component 

Oracle HTTP Server (OHS) 

J2EE Server (OC4J) 

Oracle Process Management and Notification (OPMN) 

LDAP Server (OID) 

Oracle Internet Directory Monitor (OIDMON) and Process (OIDLDAP) 

Enterprise Manager (EM) 

Enterprise Manager (EM) 

Table 4 lists the Oracle 10g AS Infrastructure services and how they are managed by the Oracle components, which are then managed by the Sun Cluster HA for Oracle Application Server.

Table 4 Oracle 10g AS Infrastructure Components

Services 

Component 

Oracle HTTP Server (OHS) 

J2EE Server (OC4J) 

Oracle LDAP Server (OID) 

Oracle Process Management and Notification (OPMN) 

Enterprise Manager (EM) 

Enterprise Manager (EM) 

Planning the Sun Cluster HA for Oracle Application Server Installation and Configuration

This section contains the information you need to plan your Sun Cluster HA for Oracle Application Server installation and configuration.

Configuration Restrictions

This section provides a list of software and hardware configuration restrictions that apply to Sun Cluster HA for Oracle Application Server only.


Caution – Caution –

Your data service configuration might not be supported if you do not observe these restrictions.


For restrictions that apply to all data services, see the Sun Cluster Release Notes.

Configuration Requirements

The requirements in this section apply to the Sun Cluster HA for Oracle Application Server only.

These requirements are setup in configuration and registration files within /opt/SUNWsc9ias/util. These files allow you to register the Sun Cluster components with Sun Cluster, with appropriate dependencies applied.

You must use these files to register the Sun Cluster HA for Oracle Application Server resources.

Files within /opt/SUNWsc9ias/util that are prefixed 9ias should be used for the Oracle 9iAS Infrastructure components and files prefixed 10gas should be used for the Oracle 10g AS Infrastructure components.


Caution – Caution –

Your data service configuration might not be supported if you do not adhere to these requirements.


Sun Cluster components and their dependencies –

Table 5 Oracle 9iAS Infrastructure components and their dependencies (via -> symbol)

Component 

Description 

Oracle Internet Directory Monitor (OIDMON) 

-> SUNW.HAStoragePlus resource

-> Oracle Database Server resource

-> Oracle Database Listener resource

Oracle Internet Directory Process (OIDLDAP)  

-> Oracle Internet Directory Monitor (OIDMON) resource

Oracle Process Management and Notification (OPMN)  

-> Oracle Internet Directory Process (OIDLDAP) resource

Enterprise Manager (EM)  

-> Oracle Process Management and Notification (OPMN)resource

Table 6 Oracle 10g AS Infrastructure components and their dependencies (via -> symbol)

Component 

Description 

Oracle Process Management and Notification (OPMN)  

-> SUNW.HAStoragePlus resource

-> Oracle Database Server resource

-> Oracle Database Listener resource

Enterprise Manager (EM)  

-> Oracle Process Management and Notification (OPMN)resource

The Sun Cluster HA for Oracle Application Server configuration and registration files within /opt/SUNWsc9ias/util define these dependencies . Example 1 lists the Oracle 10g AS configuration and registration files.


Example 1 Oracle 10g AS Infrastructure configuration and registration files for Sun Cluster


# cd /opt/SUNWsc9ias/util
#
# ls -l 
total 24
-rwxr-xr-x   1 root     sys         1516 Jul 14 12:33 10gas_config
-r-xr-xr-x   1 root     sys         2738 Jul 14 12:33 10gas_register
-rwxr-xr-x   1 root     sys         1671 Jul 14 12:33 9ias_config
-r-xr-xr-x   1 root     sys         4383 May 27 09:48 9ias_register
# more 10g*
::::::::::::::
10gas_config
::::::::::::::
#
# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# This file will be sourced in by 10gas_register and the parameters
# listed below will be used.
#
# These parameters can be customized in (key=value) form
#
#            RG - name of the SC resource group containing the resources
#       RS_OPMN - name of the SC Oracle Process Monitor Notification resource
#         RS_EM - name of the SC Enterprise Manager Web site resource
#
#   ORACLE_HOME - name of the Oracle home directory
#    ORACLE_SID - name of the Oracle SID
#    OIAS_LHOST - name of the Oracle 10gAS Infrastructure logical hostname
#     OIAS_USER - name of the Oracle 10gAS Infrastructure userid
#    OIAS_ADMIN - name of the Oracle 10gAS Internet Directory Admin password
#    OIAS_INFRA - name of the Oracle 10gAS Infrastructure /var/opt/oracle
#     OIAS_FQDN - name of the Oracle 10gAS fully qualified domainname
#     OIAS_OPMN - name of the Oracle 10gAS ias-components
#               e.g. OIAS_OPMN=OID/HTTP_Server/OC4J or OIAS_OPMN=all
#
#       ALL indicates all the installed ias-components
#
#         RS_LH - name of the SC Logical Hostname resource
#        RS_HAS - name of the SC Oracle 10gAS HAStoragePlus resource
#     RS_ORACLE - name of the SC Oracle resource
#     RS_ORALSR - name of the SC Oracle Listener resource
#
 
RG=
RS_OPMN=
RS_EM=
 
ORACLE_HOME=
ORACLE_SID=
OIAS_LHOST=
OIAS_USER=
OIAS_ADMIN=
OIAS_INFRA=
OIAS_FQDN=
OIAS_OPMN=
 
RS_LH=
RS_HAS=
RS_ORACLE=
RS_ORALSR=

::::::::::::::
10gas_register
::::::::::::::
#
# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
 
. `dirname $0`/10gas_config
 
PORT=10000
OIAS_ADMIN=dummy
OIAS_FQDN=dummy
 
validate_registration()
{
St=$?
RS=$1
RG=$2
ORACLE_HOME=$3
ORACLE_SID=$4
OIAS_LHOST=$5
OIAS_USER=$6
OIAS_ADMIN=$7
OIAS_INFRA=$8
OIAS_FQDN=$9
 
if [ "${St}" -ne 0 ]; then
        echo "Registration of resource ${RS} failed,\
		 please correct the wrong parameters"
        exit 1
else
        echo "Registration of resource ${RS} succeeded"
fi
 
# VALIDATE RESOURCE
 
`dirname $0`/../bin/validate_9ias -R $RS -G $RG \
-O $ORACLE_HOME -S $ORACLE_SID -H $OIAS_LHOST \
-U $OIAS_USER -P $OIAS_ADMIN -E $OIAS_INFRA -D $OIAS_FQDN
 
St=$?
 
if [ "${St}" -ne 0 ]; then
        echo "Validation of resource ${RS} failed, \
		please correct the wrong parameters"
        echo "Removing resource ${RS} from the cluster configuration"
 
        scrgadm -r -j ${RS}
        exit 1
else
        echo "Validation of resource ${RS} succeeded"
fi
}
 
scrgadm -a -j $RS_OPMN -g $RG -t SUNW.gds \
-x Start_command="/opt/SUNWsc9ias/bin/start-opmn \
-R $RS_OPMN -G $RG -O $ORACLE_HOME -S $ORACLE_SID -H $OIAS_LHOST \
-U $OIAS_USER -P $OIAS_ADMIN -E $OIAS_INFRA -D $OIAS_FQDN -C $OIAS_OPMN " \
-x Stop_command="/opt/SUNWsc9ias/bin/stop-opmn \
-R $RS_OPMN -G $RG -O $ORACLE_HOME -S $ORACLE_SID -H $OIAS_LHOST \
-U $OIAS_USER -P $OIAS_ADMIN -E $OIAS_INFRA -D $OIAS_FQDN -C $OIAS_OPMN " \
-x Probe_command="/opt/SUNWsc9ias/bin/probe-opmn \
-R $RS_OPMN -G $RG -O $ORACLE_HOME -S $ORACLE_SID -H $OIAS_LHOST \
-U $OIAS_USER -P $OIAS_ADMIN -E $OIAS_INFRA -D $OIAS_FQDN -C $OIAS_OPMN " \
-y Port_list=$PORT/tcp -y Network_resources_used=$RS_LH \
-x Stop_signal=9 -x Probe_timeout=90 \
-y Resource_dependencies=$RS_HAS,$RS_ORACLE,$RS_ORALSR
 
validate_registration $RS_OPMN $RG \
$ORACLE_HOME $ORACLE_SID $OIAS_LHOST \
$OIAS_USER $OIAS_ADMIN $OIAS_INFRA $OIAS_FQDN $OIAS_OPMN
 
if [ ! -z "$RS_EM" ]; then
 
scrgadm -a -j $RS_EM -g $RG -t SUNW.gds \
-x Start_command="/opt/SUNWsc9ias/bin/start-em \
-R $RS_EM -G $RG -O $ORACLE_HOME -S $ORACLE_SID -H $OIAS_LHOST \
-U $OIAS_USER -P $OIAS_ADMIN -E $OIAS_INFRA -D $OIAS_FQDN " \
-x Stop_command="/opt/SUNWsc9ias/bin/stop-em \
-R $RS_EM -G $RG -O $ORACLE_HOME -S $ORACLE_SID -H $OIAS_LHOST \
-U $OIAS_USER -P $OIAS_ADMIN -E $OIAS_INFRA -D $OIAS_FQDN " \
-x Probe_command="/opt/SUNWsc9ias/bin/probe-em \
-R $RS_EM -G $RG -O $ORACLE_HOME -S $ORACLE_SID -H $OIAS_LHOST \
-U $OIAS_USER -P $OIAS_ADMIN -E $OIAS_INFRA -D $OIAS_FQDN " \
-y Port_list=$PORT/tcp -y Network_resources_used=$RS_LH \
-x Stop_signal=9 \
-y Resource_dependencies=$RS_OPMN
 
validate_registration $RS_EM $RG \
$ORACLE_HOME $ORACLE_SID $OIAS_LHOST \
$OIAS_USER $OIAS_ADMIN $OIAS_INFRA $OIAS_FQDN
 
fi
 

Installing and Configuring Sun Cluster

This section contains the procedures you need to install and configure Sun Cluster.

ProcedureHow to Install and Configure Sun Cluster


Caution – Caution –

Oracle 9iAS (version 9.0.2 and 9.0.3) and Oracle 10g AS (version 9.0.4) does not support installation on a hardware cluster. So for the duration of the install and post install configuration, Sun Cluster must be stopped. You should have access to the console before the next step.Your data service configuration might not be supported if you do not adhere to these requirements.



Note –

This sections assumes you have setup a Cluster File System to support either the Oracle 9iAS Infrastructure or Oracle 10g AS Infrastructure installation.


Steps
  1. Edit /etc/vfstab to temporarily remove the global mount option

    As the Infrastructure mount point will be mounted while the node is in non-cluster mode you must edit /etc/vfstab to temporarily remove the global mount option, if the Infrastructure mount point is a Global File System.

    It is recommended that you repeat the line and comment out the original entry and amend the copied entry to omit the global option.

  2. Stop the Cluster


    # scshutdown -g0 -y 
    
  3. Boot each Cluster Node in Non-Cluster Mode


    ok boot -x 
    
  4. Take ownership of the Infrastructure File System diskset/diskgroup

    For Solaris Volume Manager


    #  metaset -s <diskset> -f -C take 
    #  mount  <Infrastructure mount point>
    

    For Veritas Volume Manager


    #  vxdg -C import <diskgroup> 
    #  vxdg -g <diskgroup> startall
    #  mount  <Infrastructure mount point>
    
  5. Plumb the Infrastructure logical IP address


    #  ifconfig <interface> addif <logical host> up 
    
  6. Install the Oracle 9iAS Infrastructure


    Note –

    Refer to Step 7 if you are installing the Oracle 10g AS Infrastructure


    For this section, follow the Oracle Application Server, Installation Guide manual to install Sun Cluster .

    1. Enable and test the interposed logical host

      This step requires that the Sun Cluster HA for Oracle Application Server data service has been installed on all nodes that will be part of the Sun Cluster.

      If you did not install the Sun Cluster HA for Oracle Application Server package during your initial Sun Cluster installation, proceed to Installing the Sun Cluster HA for Oracle Application Server Packages before you continue with this step.


      Note –

      Oracle 9iAS Infrastructure requires that the logical host is interposed for any gethostname() calls. You must carry out this step on all nodes that will be part of the Sun Cluster. The logical hostname being set in LHOSTNAME is the short name not the fully qualified name.



      # cd /opt/SUNWsc9ias/lib
      # cp libloghost_32.so.1 /usr/lib/libloghost_32.so.1 
      # cp libloghost_64.so.1 /usr/lib/sparcv9/libloghost_64.so.1
      #
      # cd /usr/lib/secure
      # ln -s /usr/lib/libloghost_32.so.1 libloghost_32.so.1
      #
      # cd /usr/lib/secure/sparcv9
      # ln -s /usr/lib/sparcv9/libloghost_64.so.1  libloghost_64.so.1  
      #
      # su - <Oracle Application Server Userid> 
      $ LD_PRELOAD_32=libloghost_32.so.1
      $ LHOSTNAME=<logical hostname>
      $ export LHOSTNAME  LD_PRELOAD_32
      $
      $ uname -n
      <logical host>     <- The logical host should be returned
    2. Setting ORACLE_HOME during the install

      When prompted for the ORACLE_HOME variable during the install, point to a directory on the Infrastructure File System you mounted in Step 4.

      The hostname picked up by runInstaller will be the logical hostname you plumbed in Step 5

    3. Pre-task before running the configuration assistants

      After installing the software, the Oracle 9iAS installer runs the configuration assistants for the various Oracle 9iAS Infrastructure components. Prior to starting the configuration assistants, the installer will prompt to execute a script — root.sh. Before running the root.sh script, the following needs to be done in another window. This is because OHS uses configuration information defined in apachectl and does not inherit the variable values LD_PRELOAD_32 and LHOSTNAME.

      Add the following three lines to the CONFIGURATION section in apachectl (you can add these three lines just before the PIDFILE= setting in the file).


      $ cd $ORACLE_HOME/Apache/Apache/bin 
      $
      $ vi apachectl
      
      and add the following three lines to the CONFIGURATION section in apachectl 
      (you can add these three lines just before the PIDFILE= setting)
      
      LD_PRELOAD_32=libloghost_32.so.1
      LHOSTNAME=<logical hostname>
      export LHOSTNAME LD_PRELOAD_32 
      
    4. Install Patches


      Note –

      It is important that you follow the patch installations very carefully within the patch README files. Failure to do so will mean that certain functions within the Sun Cluster HA for Oracle Application Server will not work correctly.

      Issues have been traced back to patches not being installed correctly. Oracle 9iAS version 9.0.2 requires that it is patched correctly before being used within Sun Cluster, including any post patch installation steps. Time spent here will be worthwhile in the end.



      Tip –

      When installing patches it is worthwhile checking $ORACLE_HOME/opmn/conf/opmn.xml to see if any more sections have been added by the patch. You should perform this check only if you are requested to run a root.sh script.

      If you are requested to run a root.sh script, then before you hit OK for that script, you should check $ORACLE_HOME/opmn/conf/opmn.xml. If any new sections have been added please include LD_LIBRARY_PATH, LD_PRELOAD_32, LHOSTNAME and DISPLAY as listed within the next step, before hitting enter to the OK message.


      Check the latest release notes for any post install patches.

    5. Edit opmn.xml

      Stop opmn by issuing the following command


      $ $ORACLE_HOME/opmn/bin/opmnctl stopall 
      

      Edit the $ORACLE_HOME/opmn/conf/opmn.xml file and add entries for the LD_PRELOAD_32 and LHOSTNAME environment variables in the environment section for OC4J_DAS, home, OC4J_Demos, CUSTOM, etc. For example


      Note –

      In the example below, the LD_LIBRARY_PATH value should be replaced by your $ORACLE_HOME/lib, the DISPLAY value replaced with your logical hostname and the LHOSTNAME replaced by the fully qualified logical hostname.



       $ cat /global/ora9ias/infra/opmn/config/opmn.xml
      <ias-instance xmlns="http://www.oracle.com/ias-instance">
        <notification-server>
          <port local="6100" remote="6200" request="6003"/>
          <log-file path="/global/ora9ias/infra/opmn/logs/ons.log" level="3"/>
        </notification-server>
        <process-manager>
          <ohs gid="HTTP Server" maxRetry="3">
            <start-mode mode="ssl"/>
          </ohs>
          <oc4j maxRetry="3" instanceName="home" numProcs="1">
            <config-file path="/global/ora9ias/infra/j2ee/home/config/server.xml"/>
            <oc4j-option value="-properties"/>
            <port ajp="3000-3100" jms="3201-3300" rmi="3101-3200"/>
            <environment>
              <prop name="DISPLAY" value="ora9ias:0.0"/>
              <prop name="LD_LIBRARY_PATH" value="/global/ora9ias/infra/lib"/>
              <prop name="LHOSTNAME" value="ora9ias.com"/>
              <prop name="LD_PRELOAD_32" value="libloghost_32.so.1"/>
            </environment>
          </oc4j>
          <oc4j maxRetry="3" instanceName="OC4J_DAS" gid="OC4J_DAS" numProcs="1">
            <config-file path="/global/ora9ias/infra/j2ee/OC4J_DAS/config/server.xml"/>
            <java-option value="-server -Xincgc -Xnoclassgc -Xmx256m "/>
            <oc4j-option value="-properties"/>
            <port ajp="3001-3100" jms="3201-3300" rmi="3101-3200"/>
            <environment>
      <prop name="DISPLAY" value="ora9ias:0.0"/>
              <prop name="LD_LIBRARY_PATH" value="/global/ora9ias/infra/lib"/>
              <prop name="LHOSTNAME" value="ora9ias.com"/>
              <prop name="LD_PRELOAD_32" value="libloghost_32.so.1"/>
             </environment>
          </oc4j>
          <oc4j maxRetry="3" instanceName="OC4J_Demos" gid="OC4J_Demos" numProcs="1">
            <config-file path="/global/ora9ias/infra/j2ee/OC4J_Demos/config/server.xml"/>
            <java-option value="-Xmx512M "/>
            <oc4j-option value="-userThreads  -properties"/>
            <port ajp="3001-3100" jms="3201-3300" rmi="3101-3200"/>
            <environment>
              <prop name="%LIB_PATH_ENV%" value="%LIB_PATH_VALUE%"/>
      <prop name="DISPLAY" value="ora9ias:0.0"/>
              <prop name="LD_LIBRARY_PATH" value="/global/ora9ias/infra/lib"/>
              <prop name="LHOSTNAME" value="ora9ias.com"/>
              <prop name="LD_PRELOAD_32" value="libloghost_32.so.1"/> 
             </environment> 
          </oc4j>
          <custom gid="dcm-daemon" numProcs="1" noGidWildcard="true">
            <start path="/global/ora9ias/infra/dcm/bin/dcmctl daemon -logdir 
      	/global/ora9ias/infra/dcm/logs/daemon_logs"/>
            <stop path="/global/ora9ias/infra/dcm/bin/dcmctl shutdowndaemon"/>
            <environment>
      <prop name="DISPLAY" value="ora9ias:0.0"/>
              <prop name="LD_LIBRARY_PATH" value="/global/ora9ias/infra/lib"/>
              <prop name="LHOSTNAME" value="ora9ias.com"/>
              <prop name="LD_PRELOAD_32" value="libloghost_32.so.1"/>              
      </environment>
          </custom>
          <log-file path="/global/ora9ias/infra/opmn/logs/ipm.log" level="3"/>
        </process-manager>
      </ias-instance>
    6. Restart OPMN


      $  $ORACLE_HOME/opmn/bin/opmnctl startall 
      
    7. Update the OPMN configuration


      $  $ORACLE_HOME/dcm/bin/dcmctl updateConfig -ct opmn 
      
    8. Stop all the Infrastructure processes

      After the install, all the Infrastructure processes will be started. These need to be stopped so that they can be started under the control of Sun Cluster.

  7. Install the Oracle 10g AS Infrastructure


    Note –

    Refer to Step 6 if you are installing the Oracle 9iAS Infrastructure


    For this section, follow the Oracle Application Server, Installation Guide manual to install Sun Cluster.

    1. Setting ORACLE_HOME during the install

      When prompted for the ORACLE_HOME during the install, point to a directory on the Infrastructure File System you mounted in Step 4.

    2. Install Patches

      Check the latest release notes for any post install patches.

    3. Stop all the Infrastructure processes

      After the install, all the Infrastructure processes will be started. These need to be stopped so that they can be started under the control of Sun Cluster.

  8. Prepare the other Cluster Nodes

    Since the ORACLE_HOME is on shared storage, there is no need to install the software again on the other nodes within the cluster. Once the Oracle 9iAS or Oracle 10g AS Infrastructure file system is under the control of Sun Cluster, either as a Global File System or Failover File System, the Infrastructure files can be made available to other nodes within Sun Cluster.

    It is however necessary to update the oratab and emtab files in /var/opt/oracle on the other nodes within the cluster. If there are no other Oracle database instances on the other nodes, simply copy the two files from the first node to the second node etc. If there are other Oracle database instances, then add the iasdb entries from the oratab and emtab files on node 1 to the same files on node 2 etc. Create the files on node 2 if necessary.

  9. Preparation if installing the Middle Tier on the same nodes as the Infrastructure.

    Unlike the Oracle 9iAS or Oracle 10g AS Infrastructure, the middle tier may be installed on multiple active nodes to achieve high availability. Typically the middle tier and infrastructure are installed on separate nodes. However, you may wish to install the middle tier on the node(s) where the clustered infrastructure has been installed. This can be done by installing the middle tier on local disks of the nodes that could host the infrastructure.

    However, whenever the middle tier and infrastructure share a cluster node, two "/var/opt/oracle" areas must be maintained. One for the infrastructure where the "oraInst.loc" points to the "oraInventory" directory on the shared disk and another for the middle tier instance installed on local disk on each cluster node where it's "oraInst.loc" points to another "oraInventory" directory on local disk of that node. These directories are needed for applying patches and performing other upgrades or maintenance tasks and therefore must be saved.


    Note –

    When applying patches or upgrades on the infrastructure or middle tiers, the corresponding original copy of "/var/opt/oracle" must be reinstated and made available before the Oracle installer is invoked.


    Save /var/opt/oracle on each cluster node where the middle tier and infrastructure are installed together.


     # cp -rp /var/opt/oracle /var/opt/oracle_infra 
    

    Note –

    You will need to supply the directory for the Oracle 9iAS Infrastructure "/var/opt/oracle" location when you register the Sun Cluster HA for Oracle Application Server data service later on. In this case we have copied this to /var/opt/oracle_infra.


  10. Stop the Sun Cluster Infrastructure

    For Oracle 9iAS Infrastructure


    #  su -  <Oracle Application Server Userid>
    $ <Oracle Home>/bin/emctl stop
    $ <Oracle Home>/opmn/bin/opmnctl stopall
    $ <Oracle Home>/bin/oidctl server=oidldapd configset=0 instance=1 stop
    $ <Oracle Home>/bin/oidmon stop
    

    For Oracle 10g AS Infrastructure


    #  su -  <Oracle Application Server Userid>
    $ <Oracle Home>/bin/emctl stop iasconsole
    $ <Oracle Home>/opmn/bin/opmnctl stopall
    
  11. Stop the Oracle Database and Listener


    #  su -  <Oracle Database  Userid>
    $ <Oracle Home>/bin/lsnrctl  stop
    $ <Oracle Home>/bin/sqlplus "/ as sysdba"
    $ shutdown normal
    $ quit
    
  12. Edit /etc/vfstab to reinstate the global mount option

    If the Infrastructure mount point is a Global File System and you temporarily removed the global option in Step 1 you must now reinstate the global mount option.

    You must edit /etc/vfstab to reinstate the global mount option. If you commented out the original entry just remove just that comment and comment out the copied entry you made in Step 1.

  13. Boot each Node in Cluster Mode


    #  reboot  
    

Verifying the Installation and Configuration of Sun Cluster

This section contains the procedure you need to verify the installation and configuration.

ProcedureHow to Verify the Installation and Configuration of Sun Cluster

This procedure does not verify that your application is highly available because you have not yet installed your data service.

Before verifying the Installation and Configuration of Sun Cluster, ensure that the installation has been completed by following the steps inInstalling and Configuring Sun Cluster.

Steps
  1. Start theOracle Database and Listener


    #  su -  <Oracle Database  Userid>
    $ <Oracle Home>/bin/lsnrctl  start
    $ <Oracle Home>/bin/sqlplus "/ as sysdba"
    $ startup
    $ quit
    
  2. Start the Sun Cluster Infrastructure

    For Oracle 9iAS Infrastructure


    #  su -  <Oracle Application Server Userid>
    $ <Oracle Home>/bin/oidmon start
    $ <Oracle Home>/bin/oidctl server=oidldapd configset=0 instance=1 start
    $ <Oracle Home>/opmn/bin/opmnctl startalll
    $ <Oracle Home>/bin/emctl start
    

    For Oracle 10g AS Infrastructure


    #  su -  <Oracle Application Server Userid>
    $ <Oracle Home>/opmn/bin/opmnctl startall
    $ <Oracle Home>/bin/emctl start  iasconsole
    
  3. Verifying the Oracle 9iAS Infrastructure


    # su - <Oracle Application Server Userid>
    $
    $  <Oracle Home>/bin/emctl status 
    EMD is up and running : 200 OK
    $
    $ <Oracle Home>/dcm/bin/dcmctl getstate -v 
      
    Current State for Instance:iasdb1.psemea14.uk.sun.com
     
        Component               Type          Up Status     In Sync Status
    ================================================================================
    1   HTTP Server             ohs           Up            True
    2   OC4J_DAS                oc4j          Up            True
    3   OC4J_Demos              oc4j          Down          True
    4   home                    oc4j          Down          True
  4. Verifying the Oracle 10g AS Infrastructure


    # su - <Oracle Application Server Userid>
    $
    $  <Oracle Home>/bin/emctl status iasconsole
    Oracle Enterprise Manager 10g Application Server Control 9.0.4.0.0
    Copyright (c) 2002, 2003 Oracle Corporation.  All rights reserved.
    Oracle 10g Application Server Control is running.
    $
    $ <Oracle Home>/opmn/bin/opmnctl status
     
    Processes in Instance: 10g_inst1.psemea12
    -------------------+--------------------+-------+---------
    ias-component      | process-type       |   pid | status
    -------------------+--------------------+-------+---------
    OID                | OID                | 17961 | Alive
    HTTP_Server        | HTTP_Server        | 18065 | Alive
    OC4J               | OC4J_SECURITY      | 18318 | Alive
    dcm-daemon         | dcm-daemon         | 19324 | Alive
    LogLoader          | logloaderd         |   N/A | Down

Installing the Sun Cluster HA for Oracle Application Server Packages

If you did not install the Sun Cluster HA for Oracle Application Server packages during your Sun Cluster installation, perform this procedure to install the packages. Perform this procedure on each cluster node where you are installing the Sun Cluster HA for Oracle Application Server packages. To complete this procedure, you need the Sun Cluster Agents CD-ROM.

If you are installing more than one data service simultaneously, perform the procedure in Installing the Software in Sun Cluster Software Installation Guide for Solaris OS.

Install the Sun Cluster HA for Oracle Application Server packages by using one of the following installation tools:


Note –

If you are using Solaris 10, install these packages only in the global zone. To ensure that these packages are not propagated to any local zones that are created after you install the packages, use the scinstall utility to install these packages. Do not use the Web Start program.


ProcedureHow to Install the Sun Cluster HA for Oracle Application Server Packages Using the Web Start Program

You can run the Web Start program with a command-line interface (CLI) or with a graphical user interface (GUI). The content and sequence of instructions in the CLI and the GUI are similar. For more information about the Web Start program, see the installer(1M) man page.

Steps
  1. On the cluster node where you are installing the Sun Cluster HA for Oracle Application Server packages, become superuser.

  2. (Optional) If you intend to run the Web Start program with a GUI, ensure that your DISPLAY environment variable is set.

  3. Insert the Sun Cluster Agents CD-ROM into the CD-ROM drive.

    If the Volume Management daemon vold(1M) is running and configured to manage CD-ROM devices, it automatically mounts the CD-ROM on the /cdrom/cdrom0 directory.

  4. Change to the Sun Cluster HA for Oracle Application Server component directory of the CD-ROM.

    The Web Start program for the Sun Cluster HA for Oracle Application Server data service resides in this directory.


    # cd /cdrom/cdrom0/components/SunCluster_HA_ORACLE9I_AS_3.1
    
  5. Start the Web Start program.


    # ./installer
    
  6. When you are prompted, select the type of installation.

    • To install only the C locale, select Typical.

    • To install other locales, select Custom.

  7. Follow the instructions on the screen to install the Sun Cluster HA for Oracle Application Server packages on the node.

    After the installation is finished, the Web Start program provides an installation summary. This summary enables you to view logs that the Web Start program created during the installation. These logs are located in the /var/sadm/install/logs directory.

  8. Exit the Web Start program.

  9. Remove the Sun Cluster Agents CD-ROM from the CD-ROM drive.

    1. To ensure that the CD-ROM is not being used, change to a directory that does not reside on the CD-ROM.

    2. Eject the CD-ROM.


      # eject cdrom
      

ProcedureHow to Install the Sun Cluster HA for Oracle Application Server Packages using the scinstall Utility

Use this procedure to install the Sun Cluster HA for Oracle Application Server packages by using the scinstall utility. You need the Sun Cluster Agents CD-ROM to perform this procedure. This procedure assumes that you did not install the data service packages during your initial Sun Cluster installation.

If you installed the Sun Cluster HA for Oracle Application Server packages as part of your initial Sun Cluster installation, proceed to Registering and Configuring Sun Cluster HA for Oracle Application Server.

Otherwise, use this procedure to install the Sun Cluster HA for Oracle Application Server packages. Perform this procedure on all nodes that can run Sun Cluster HA for Oracle Application Server data service.

Steps
  1. Load the Sun Cluster Agents CD-ROM into the CD-ROM drive.

  2. Run the scinstall utility with no options.

    This step starts the scinstall utility in interactive mode.

  3. Choose the menu option, Add Support for New Data Service to This Cluster Node.

    The scinstall utility prompts you for additional information.

  4. Provide the path to the Sun Cluster Agents CD-ROM.

    The utility refers to the CD as the “data services cd.”

  5. Specify the data service to install.

    The scinstall utility lists the data service that you selected and asks you to confirm your choice.

  6. Exit the scinstall utility.

  7. Unload the CD from the drive.

Registering and Configuring Sun Cluster HA for Oracle Application Server

This section contains the procedures you need to configure Sun Cluster HA for Oracle Application Server.

ProcedureHow to Register and Configure Sun Cluster HA for Oracle Application Server as a Failover Service

This procedure assumes that you installed the data service packages during your initial Sun Cluster installation.

If you did not install the Sun Cluster HA for Oracle Application Server packages as part of your initial Sun Cluster installation, go to How to Install the Sun Cluster HA for Oracle Application Server Packages using the scinstall Utility.

Steps
  1. Become superuser on one of the nodes in the cluster that will host Sun Cluster.

  2. Register the SUNW.gds resource type.


    # scrgadm -a -t SUNW.gds
    
  3. Register the SUNW.HAStoragePlus resource type.


    # scrgadm -a -t SUNW.HAStoragePlus
    
  4. Register the SUNW.oracle_server and SUNW.oracle_listener resource type.


    # scrgadm -a -t SUNW.oracle_server
    # scrgadm -a -t SUNW.oracle_listener
    
  5. Create a failover resource group.


    # scrgadm -a -g Sun Cluster-failover-resource-group
    
  6. Create a resource for the Sun Cluster Disk Storage.


    # scrgadm -a -j Sun Cluster-has-resource  \
    -g Sun Cluster-failover-resource-group   \
    -t SUNW.HAStoragePlus  \
    -x FilesystemMountPoints=Sun Cluster -Infrastructure instance-mount-points
    
  7. Create a resource for the Sun Cluster Logical Hostname.


    # scrgadm -a -L -j Sun Cluster-lh-resource  \
    -g Sun Cluster-failover-resource-group  \
    -l Sun Cluster-logical-hostname
    
  8. Enable the failover resource group that now includes the Sun Cluster Disk Storage and Logical Hostname resources.


    # scswitch -Z -g Sun Cluster-failover-resource-group
    
  9. Create a resource for the Sun Cluster Oracle Database.


    Note –

    For detailed information about Sun Cluster HA for Oracle, refer to the Sun Cluster Data Services Installation and Configuration Guide.



    # 
    scrgadm -a -j Sun Cluster-ORACLE-resource \
    -t SUNW.oracle_server  \
    -g  Sun Cluster-failover-resource-group\
    -x Connect_string=<user/passwd>\
    -x ORACLE_SID=<Oracle 9iAS instance>\
    -x ORACLE_HOME=<Oracle 9iAS Infrastructure directory>  \
    -x Alert_log_file=<$ORACLE_HOME alert log file>
     
    #
    # scswitch -e -j Sun Cluster-ORACLE-resource
    
  10. Create a resource for the Sun Cluster Oracle Listener.


    Note –

    For detailed information about Sun Cluster HA for Oracle, refer to the Sun Cluster Data Services Installation and Configuration Guide.



    # scrgadm -a -j Sun Cluster-ORALSR-resource \
    -t SUNW.oracle_listener  \
    -g  Sun Cluster-failover-resource-group\
    -x Listener_name=<Instance>\
    -x ORACLE_HOME=<Oracle 9iAS Infrastructure directory>\
    
    #
    # scswitch -e -j Sun Cluster-ORALSR-resource
    
  11. Create the Oracle 9iAS Infrastructure resources.


    Note –

    Refer to Step 13 for Oracle 10g AS Infrastructure


    Edit the 9ias_config file and follow the comments with that file, for example


    #
    # Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
    # Use is subject to license terms.
    #
    # This file will be sourced in by 9ias_register and the parameters
    # listed below will be used.
    #
    # These parameters can be customized in (key=value) form
    #
    #            RG - name of the SC resource group containing the resources
    #     RS_OIDMON - name of the SC Oracle Internet Directory Monitor resource
    #    RS_OIDLDAP - name of the SC Oracle Internet Directory resource
    #       RS_OPMN - name of the SC Oracle Process Monitor Notification resource
    #         RS_EM - name of the SC Enterprise Manager Web site resource
    #
    #       Note: Only one Enterprise Manager is required if multiple
    #               infrastructure instances are being deployed.
    #
    #             Omit the value to RS_EM if you do not require a SC resource
    #               for the Enterprise Manager.
    #
    #   ORACLE_HOME - name of the Oracle home directory
    #    ORACLE_SID - name of the Oracle SID
    #    OIAS_LHOST - name of the Oracle 9iAS Infrastructure logical hostname
    #     OIAS_USER - name of the Oracle 9iAS Infrastructure userid
    #    OIAS_ADMIN - name of the Oracle 9iAS Internet Directory Admin password
    #    OIAS_INFRA - name of the Oracle 9iAS Infrastructure /var/opt/oracle
    #     OIAS_FQDN - name of the Oracle 9iAS fully qualified domainname
    #     OIAS_OPMN - name of the Oracle 9iAS OPMN instance names to start
    #               e.g. OIAS_OPMN=ohs,OC4J_DAS or ALL
    #       ALL indicates all instance names in $ORACLE_HOME/opmn/conf/opmn.xml
    #
    #         RS_LH - name of the SC Logical Hostname resource
    #        RS_HAS - name of the SC Oracle 9iAS HAStoragePlus resource
    #     RS_ORACLE - name of the SC Oracle resource
    #     RS_ORALSR - name of the SC Oracle Listener resource
    #
     
    RG=
    RS_OIDMON=
    RS_OIDLDAP=
    RS_OPMN=
    RS_EM=
     
    ORACLE_HOME=
    ORACLE_SID=
    OIAS_LHOST=
    OIAS_USER=
    OIAS_ADMIN=
    OIAS_INFRA=
    OIAS_FQDN=
    OIAS_OPMN=
     
    RS_LH=
    RS_HAS=
    RS_ORACLE=
    RS_ORALSR=

    The following is an example for Sun Cluster for Oracle 9iAS Infrastructure.


    RG=9ias-infra-rg
    RS_OIDMON=9ias-oidmon-res
    RS_OIDLDAP=9ias-oidldap-res
    RS_OPMN=9ias-opmn-res
    RS_EM=9ias-em-res
     
    ORACLE_HOME=/global/ora9ias/infra
    ORACLE_SID=iasdb
    OIAS_LHOST=ora9ias
    OIAS_USER=oraprod
    OIAS_ADMIN=1as_admin
    OIAS_INFRA=/var/opt/oracle or 
    		/var/opt/oracle_infra if the  middle tier is also installed and
    			 /var/opt/oracle was renamed to /var/opt/oracle_infra
     OIAS_FQDN=ora9ias.com
    OIAS_OPMN=ohs/oc4j_das or 
    		all if all components are required
    RS_LH=9ias-lhs-res
    RS_HAS=9ias-has-res
    RS_ORACLE=9ias-oracle-res
    RS_ORALSR=9ias-oralsr-res
    

    # ./9ias_register
    
  12. Enable each Oracle 9iAS Infrastructure resource.


    # scstat
    #
    # scswitch -e -j Sun Cluster-OIDMON-resource
    # scswitch -e -j Sun Cluster-OIDLDAP-resource
    # scswitch -e -j Sun Cluster-OPMN-resource
    # scswitch -e -j Sun Cluster-EM-resource
    
  13. Create the Oracle 10g AS Infrastructure resources.


    Note –

    Refer to Step 11 for Oracle 9iAS Infrastructure


    Edit the 10gas_config file and follow the comments with that file, for example


    #
    # Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
    # Use is subject to license terms.
    #
    # This file will be sourced in by 10gas_register and the parameters
    # listed below will be used.
    #
    # These parameters can be customized in (key=value) form
    #
    #            RG - name of the SC resource group containing the resources
    #       RS_OPMN - name of the SC Oracle Process Monitor Notification resource
    #         RS_EM - name of the SC Enterprise Manager Web site resource
    #
    #   ORACLE_HOME - name of the Oracle home directory
    #    ORACLE_SID - name of the Oracle SID
    #    OIAS_LHOST - name of the Oracle 10gAS Infrastructure logical hostname
    #     OIAS_USER - name of the Oracle 10gAS Infrastructure userid
    #    OIAS_ADMIN - name of the Oracle 10gAS Internet Directory Admin password
    #    OIAS_INFRA - name of the Oracle 10gAS Infrastructure /var/opt/oracle
    #     OIAS_FQDN - name of the Oracle 10gAS fully qualified domainname
    #     OIAS_OPMN - name of the Oracle 10gAS ias-components
    #               e.g. OIAS_OPMN=OID/HTTP_Server/OC4J or OIAS_OPMN=all
    #
    #       ALL indicates all the installed ias-components
    #
    #         RS_LH - name of the SC Logical Hostname resource
    #        RS_HAS - name of the SC Oracle 10gAS HAStoragePlus resource
    #     RS_ORACLE - name of the SC Oracle resource
    #     RS_ORALSR - name of the SC Oracle Listener resource
    #
     
    RG=
    RS_OPMN=
    RS_EM=
     
    ORACLE_HOME=
    ORACLE_SID=
    OIAS_LHOST=
    OIAS_USER=
    OIAS_ADMIN=
    OIAS_INFRA=
    OIAS_FQDN=
    OIAS_OPMN=
     
    RS_LH=
    RS_HAS=
    RS_ORACLE=
    RS_ORALSR=

    The following is an example for Sun Cluster for Oracle 10g AS Infrastructure.


    Note –

    The values for OIAS_ADMIN and OIAS_FQDN are not used within the Sun Cluster HA for Oracle Application Server for Oracle 10g AS, however you need to supply a value for the registration script and therefore can supply the value dummy.



    RG=10gas-infra-rg
    RS_OPMN=10gas-opmn-res
    RS_EM=10gas-em-res
     
    ORACLE_HOME=/global/ora10gas/infra
    ORACLE_SID=iasdb
    OIAS_LHOST=ora10gas
    OIAS_USER=oraprod
    OIAS_ADMIN=dummy
    OIAS_INFRA=/var/opt/oracle or 
    		/var/opt/oracle_infra if the  middle tier is also installed and
    			 /var/opt/oracle was renamed to /var/opt/oracle_infra
    OIAS_FQDN=dummy
    OIAS_OPMN=OID/HTTP_Server/OC4J or 
    		all if all components are required
    RS_LH=10gas-lhs-res
    RS_HAS=10gas-has-res
    RS_ORACLE=10gas-oracle-res
    RS_ORALSR=10gas-oralsr-res
    

    # ./10gas_register
    
  14. Enable each Oracle 10g AS Infrastructure resource.


    # scstat
    #
    # scswitch -e -j Sun Cluster-OPMN-resource
    # scswitch -e -j Sun Cluster-EM-resource
    

Verifying the Sun Cluster HA for Oracle Application Server Installation and Configuration

This section contains the procedure you need to verify that you installed and configured your data service correctly.

ProcedureHow to Verify the Sun Cluster HA for Oracle Application Server Installation and Configuration

Steps
  1. Become superuser on one of the nodes in the cluster that will host Sun Cluster.

  2. Ensure all the Sun Cluster resources are online with scstat.


    # scstat 
    

    For each Sun Cluster resource that is not online, use the scswitch command as follows.


    # scswitch -e -j Sun Cluster- resource
    
  3. Run the scswitch command to switch the Sun Cluster resource group to another cluster node, such as node2.


    # scswitch -z -g Sun Cluster-failover-resource-group -h node2
    

Understanding the Sun Cluster HA for Oracle Application Server Fault Monitor

This section describes the Sun Cluster HA for Oracle Application Server fault monitor's probing algorithm or functionality.

For conceptual information on fault monitors, see the Sun Cluster Concepts Guide.

Resource Properties

The Sun Cluster HA for Oracle Application Server fault monitor uses the same resource properties as resource type SUNW.gds. Refer to the SUNW.gds(5) man page for a complete list of resource properties used.

Probing Algorithm and Functionality

Debug Sun Cluster HA for Oracle Application Server

Sun Cluster HA for Oracle Application Server can be used by multiple Sun Cluster instances. However, it is possible to turn on debug for all Sun Cluster instances or a particular Sun Cluster instance.

Each Sun Cluster component has a DEBUG file in /opt/SUNWsc9ias/etc.

This files allows you to turn on debug for all Sun Cluster resources or for a specific Sun Cluster resource on a particular node with Sun Cluster. If you require debug to be turned on for Sun Cluster HA for Oracle Application Server across the whole Sun Cluster, repeat this step on all nodes within Sun Cluster.

ProcedureHow to turn on debug for Sun Cluster HA for Oracle Application Server

Steps
  1. Edit /etc/syslog.conf and change daemon.notice to daemon.debug.


    # grep daemon /etc/syslog.conf
    *.err;kern.debug;daemon.notice;mail.crit        /var/adm/messages
    *.alert;kern.err;daemon.err                     operator
    #

    Change the daemon.notice to daemon.debug and restart syslogd. The output below, from the command grep daemon /etc/syslog.conf, shows that daemon.debug has now been set.


    # grep daemon /etc/syslog.conf
    *.err;kern.debug;daemon.debug;mail.crit        /var/adm/messages
    *.alert;kern.err;daemon.err                    operator
    #
    # pkill -1 syslogd
    #
  2. Edit /opt/SUNWsc9ias/etc/config

    Edit /opt/SUNWsc9ias/etc/config and change DEBUG= to DEBUG=ALL or DEBUG=resource


    # cat /opt/SUNWsc9ias/etc/config
    #
    # Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
    # Use is subject to license terms.
    #
    # Usage:
    #       DEBUG=<RESOURCE_NAME> or ALL
    #
    DEBUG=ALL
    #

    Note –

    To turn off debug, reverse the steps above.