Installing and Configuring Sun Cluster HA for Oracle Application Server
Installing and Configuring Sun Cluster HA for Oracle Application Server
Table 1–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–1 Task Map: Installing and Configuring 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 1–2 Oracle Application Server 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 1–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 1–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 1–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 1–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 1–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 –
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.
-
Installing Oracle Application Server onto Cluster
File Systems — The Oracle Application Server can be installed onto a
Global File System or Failover File System.
Note –
It is considered best practice when mounting Global File Systems
to mount them with the /global prefix and to mount Failover File Systems with
the /local prefix.
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 Oracle Application Server 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 –
Your data service configuration might not be supported if you
do not adhere to these requirements.
-
Oracle Application Server components and their
dependencies –
Table 1–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 1–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–1
lists the Oracle 10g AS configuration and registration files.
Example 1–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 Oracle Application Server
This section contains the procedures you need to install and configure Oracle Application Server.
How to Install and Configure Oracle Application Server

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.
-
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.
-
Stop the Cluster
-
Boot each Cluster Node in Non-Cluster Mode
-
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>
|
-
Plumb the Infrastructure logical IP address
# ifconfig <interface> addif <logical host> up
|
-
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 Oracle Application Server .
-
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
|
-
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
-
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
|
-
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.
-
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>
|
-
Restart OPMN
$ $ORACLE_HOME/opmn/bin/opmnctl startall
|
-
Update the OPMN configuration
$ $ORACLE_HOME/dcm/bin/dcmctl updateConfig -ct opmn
|
-
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.
-
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 Oracle Application Server.
-
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.
-
Install Patches
Check the latest release notes for any post install patches.
-
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.
-
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.
-
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.
-
Stop the Oracle Application Server 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
|
-
Stop the Oracle Database and Listener
# su - <Oracle Database Userid>
$ <Oracle Home>/bin/lsnrctl stop
$ <Oracle Home>/bin/sqlplus "/ as sysdba"
$ shutdown normal
$ quit
|
-
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.
-
Boot each Node in Cluster Mode
Verifying the Installation and Configuration of Oracle Application Server
This section contains the procedure
you need to verify the installation and configuration.
How to Verify the Installation and Configuration of Oracle Application Server
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 Oracle Application Server,
ensure that the installation has been completed by following the steps inInstalling and Configuring Oracle Application Server.
-
Start theOracle Database and Listener
# su - <Oracle Database Userid>
$ <Oracle Home>/bin/lsnrctl start
$ <Oracle Home>/bin/sqlplus "/ as sysdba"
$ startup
$ quit
|
-
Start the Oracle Application Server 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
|
-
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
|
-
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 initial
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 Java Enterprise System Accessory CD Volume 3.
If you are installing more than one data service simultaneously, perform
the procedure in “Installing the Software” in Sun Cluster 3.1 Software Installation Guide.
Install the Sun Cluster HA for Oracle Application Server packages by using one of the following
installation tools:
-
The Web Start program
-
The scinstall utility
Note –
The Web Start program is not
available in releases earlier than Sun Cluster 3.1 Data Services 10/03.
How 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.
-
Become superuser of the cluster node where you are installing the Sun Cluster HA for Oracle Application Server
packages.
-
(Optional) If you intend to run the Web Start program with a GUI, ensure
that your DISPLAY environment
variable is set.
-
Load the Sun Java Enterprise System Accessory CD Volume 3 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.
-
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
|
-
Start the Web Start program.
-
When you
are prompted, select the type of installation.
-
To install
only the C locale, select Typical.
-
To install other locales, select Custom.
-
Follow 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.
-
Exit the Web Start program.
-
Unload the Sun Java Enterprise System Accessory CD Volume 3 from the CD-ROM drive.
-
To ensure that the CD-ROM is not being used, change to a directory
that does not reside on the CD-ROM.
-
Eject the CD-ROM.
How to Install the Sun Cluster HA for Oracle Application Server Packages 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 services 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.
Perform this procedure on all nodes that can run Sun Cluster HA for Oracle Application Server data
service.
-
Load the Sun Cluster Agents CD-ROM into the CD-ROM drive.
-
Run the scinstall utility with no options.
This step starts the scinstall utility
in interactive mode.
-
Choose the menu option, Add Support for New Data Service to This Cluster
Node.
The scinstall utility prompts you for additional
information.
-
Provide the path to the Sun Cluster Agents CD-ROM.
The utility refers to the CD as the “data services cd.”
-
Specify the data service to install.
The scinstall utility lists the data service that
you selected and asks you to confirm your choice.
-
Exit the scinstall utility.
-
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.
How 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.
-
Become superuser on one of the nodes in the cluster that will host Oracle Application Server.
-
Register the SUNW.gds resource type.
-
Register the SUNW.HAStoragePlus resource type.
# scrgadm -a -t SUNW.HAStoragePlus
|
-
Register the SUNW.oracle_server and SUNW.oracle_listener resource type.
# scrgadm -a -t SUNW.oracle_server
# scrgadm -a -t SUNW.oracle_listener
|
-
Create a failover resource group.
# scrgadm -a -g Oracle Application Server-failover-resource-group
|
-
Create a resource for the Oracle Application Server Disk Storage.
# scrgadm -a -j Oracle Application Server-has-resource \
-g Oracle Application Server-failover-resource-group \
-t SUNW.HAStoragePlus \
-x FilesystemMountPoints=Oracle Application Server -Infrastructure instance-mount-points
|
-
Create a resource for the Oracle Application Server Logical Hostname.
# scrgadm -a -L -j Oracle Application Server-lh-resource \
-g Oracle Application Server-failover-resource-group \
-l Oracle Application Server-logical-hostname
|
-
Enable the failover resource group that now includes the Oracle Application Server
Disk Storage and Logical Hostname resources.
# scswitch -Z -g Oracle Application Server-failover-resource-group
|
-
Create a resource for the Oracle Application Server 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 Oracle Application Server-ORACLE-resource \
-t SUNW.oracle_server \
-g Oracle Application Server-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 Oracle Application Server-ORACLE-resource
|
-
Create a resource for the Oracle Application Server 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 Oracle Application Server-ORALSR-resource \
-t SUNW.oracle_listener \
-g Oracle Application Server-failover-resource-group\
-x Listener_name=<Instance>\
-x ORACLE_HOME=<Oracle 9iAS Infrastructure directory>\
#
# scswitch -e -j Oracle Application Server-ORALSR-resource
|
-
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 Oracle Application Server 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
|
-
Enable each Oracle 9iAS Infrastructure resource.
# scstat
#
# scswitch -e -j Oracle Application Server-OIDMON-resource
# scswitch -e -j Oracle Application Server-OIDLDAP-resource
# scswitch -e -j Oracle Application Server-OPMN-resource
# scswitch -e -j Oracle Application Server-EM-resource
|
-
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 Oracle Application Server 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
|
-
Enable each Oracle 10g AS Infrastructure resource.
# scstat
#
# scswitch -e -j Oracle Application Server-OPMN-resource
# scswitch -e -j Oracle Application Server-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.
How to Verify the Sun Cluster HA for Oracle Application Server Installation and Configuration
-
Become superuser on one of the nodes in the cluster that will host Oracle Application Server.
-
Ensure all the Oracle Application Server resources are online with scstat.
For each Oracle Application Server resource that is not online, use the scswitch command as follows.
# scswitch -e -j Oracle Application Server- resource
|
-
Run the scswitch command to switch the Oracle Application Server
resource group to another cluster node, such as node2.
# scswitch -z -g Oracle Application Server-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
-
Enterprise Manager (EM)
-
Sleeps for Thorough_probe_interval
-
Test whether the EM process is running. If this fails, then
the probe will restart the EM resource.
-
Test whether the EM status is EMD is up and running. If this fails, then the probe will restart the EM resource.
-
If the EM resource is repeatedly restarted and subsequently
exhausts the Retry_count within the Retry_interval then a failover is initiated for the Resource Group onto another
node.
Debug Sun Cluster HA for Oracle Application Server
Sun Cluster HA for Oracle Application Server can be used by multiple Oracle Application Server instances. However, it
is possible to turn on debug for all Oracle Application Server instances or a particular Oracle Application Server
instance.
Each Oracle Application Server component has a DEBUG file in /opt/SUNWsc9ias/etc.
This files allows you to turn on debug for all Oracle Application Server resources
or for a specific Oracle Application Server 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.
How to turn on debug for Sun Cluster HA for Oracle Application Server
-
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
#
|
-
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.