 |
|
Oracle9iAS Repository
Administration and Management
Oracle Application Server Tips by Burleson
Consulting |
Because isadb is an Oracle database, the
Oracle9iAS components rely on this database being available when
they are started. After the components are started, the Isadb
database can be stopped without adverse effects to OHS and Java.
However, some Oracle9iAS components will not be able to function
without Isadb, including SSO, portal and wireless.
Hence, the Isadb database is a central
point of failure for your Oracle9iAS enterprise, and the
administrator should take steps to ensure continuous availability of
the Isadb database. These actions may include:
-
Using Oracle9i Standby Database (DataGuard)
-
Oracle9i Real Application Clusters (RAC)
-
Triple mirroring of disks
While the Oracle documentation does
not specifically mention the use of Oracle9i RAC as a availability
option for Oracle9iAS, using RAC for the repository can protect your
from lock-ups due to instance failure. Remember, when the
infrastructure repository is not available, users cannot access the
SSO login server, and the whole enterprise stops. Because the
infrastructure is such a critical component of Oracle9iAS, using a
high-availability tool such as Oracle9i RAC clusters guarantees
continuous availability for the enterprise because Oracle
Transparent Application Failover (TAF) component will automatically
continue processing any in-flight transactions if there is a failure
on any Iasdb instance.
The Oracle9iAS administrator must be
able to manage and administer the infrastructure instance and Oracle
has several tools to aid in the process. Let?s take a quick review
of the infrastructure administration tasks.
Starting and Stopping the Infrastructure
While performing general maintenance and
backups, the Oracle9iAS administrator must stop and re-start the
infrastructure instance. Because of its tight coupling to important
Oracle9iAS components, the infrastructure database must be started
in a specific order. While the startup procedures for the
infrastructure are the same as any other Oracle database, we must
remember that iasdb must be running before other Oracle9iAS
components are started. Here is the order of Iasdb startup steps:
-
Start the iasdb listener process (lsnrctl
start)
-
Start the iasdb database
-
Start the OID
-
Start emctl
-
Start the Oracle HTTP Server (OHS)
-
Start the OC4J_Das
If you are using any optional Oracle9iAS
products, you may also include the following startup steps:
-
Start the Web Cache
-
Start the OEM Intelligent Agent
-
Start OMS
With all these steps, it should come as no
surprise that the Oracle9iAS administrator uses scripts to start and
stop the Oracle9iAS components.
Oracle9iAS uses a hierarchy of shell scripts
to perform the start operations, with calls to Oracle executables at
the lowest level (Figure 2.5):
Re-draw from attached PowerPoint
Figure 2.5: The hierarchy of Oracle9iAS
scripts
Here is the main driving script to start all
the Oracle9iAS infrastructure and mid-tier components:
startall.ksh
/bin/ksh
./startinfra.sh
sleep 10
./startmidtier.sh
sleep 10
Note that this script calls the start
scripts for the infrastructure followed by calls to start the
mid-tier application. Let?s examine these scripts and see their
features. The start script for the infrastructure issues these
Oracle9iAS commands:
-
Start listener - $ORACLE_HOME/bin/lsnrctl
start
-
Start the iasdb database
$ORACLE_HOME/bin/sqlplus /nolog<<EOF
connect / as sysdba
startup
-
Start all opmnctl controlled processes -
$ORACLE_HOME/opmn/bin/opmnctl startall
-
Check status of infrastructure with DCM -
$ORACLE_HOME/dcm/bin/dcmctl getState -v -i $INFRA
-
Start OMS -
$ORACLE_HOME/bin/emctl start
oms
-
Start OEM
$ORACLE_HOME/bin/emctl start agent
$ORACLE_HOME/bin/emctl start em
Here is the whole script, ready for you to
use. Please note that the emctl commands are normally performed
manually because they prompt for a password and are not easily
scripted.
startinfra.sh
# cat startinfra.sh
#!/bin/bash
# script created by mikael.fransson@oracle.com
# Save the original path and restore it at
the end of the script
export SAVED_PATH=$PATH
# Customize ORACLE_HOME and ORACLE_SID to
your environment
export ORACLE_HOME=/home/oracle/infra904
export
PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/dcm/bin:$ORACLE_HOME/webcache/bin:$ORACL
_HOME/opmn/bin
export ORACLE_SID=iasdb
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
# Customize the following two to your
environment
export DISPLAY=localhost:0.
export INFRA=infra_904.appvr.localdomain.com
echo
echo Starting Listener
echo -----------------
$ORACLE_HOME/bin/lsnrctl start
echo
echo Starting Database
echo -----------------
$ORACLE_HOME/bin/sqlplus /nolog<<EOF
connect / as sysdba
startup
EOF
echo
echo Starting all opmnctl controlled
processes
echo
-----------------------------------------
$ORACLE_HOME/opmn/bin/opmnctl startall
echo
echo Checking status of app server instances
echo ---------------------------------------
echo Getting status for $INFRA
$ORACLE_HOME/dcm/bin/dcmctl getState -v -i
$INFRA
# If you want to automatically start the EM
website
# uncomment the following lines.
# Remember stopping EM requires a password.
#
#echo Starting the EM website
#echo -----------------------
#$ORACLE_HOME/bin/emctl start oms
#$ORACLE_HOME/bin/emctl start agent
# Restore the original path
export PATH=$SAVED_PATH
Once the infrastructure is started, we
invoke another script to start the mid-tier application. This
script performs the following actions:
-
Start all OPM processes -
$ORACLE_HOME/opmn/bin/opmnctl
startall
-
Check mid-tier status -
$ORACLE_HOME/dcm/bin/dcmctl
getState -v -i $MIDTIER
-
Start Enterprise manager -
$ORACLE_HOME/bin/emctl
start em
Here is the final script, ready to run.
startmidtier.sh
#!/bin/bash
# script maintained by mikael.fransson@oracle.com
# Save the original path and restore it at
the end of the script
export SAVED_PATH=$PATH
# Customize ORACLE_HOME and ORACLE_SID to
your environment
export ORACLE_HOME=/home/oracle/oraportal904
export
PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/dcm/bin:$ORACLE_HOME/webcache/bin:
\$ORACLE_HOME/opmn/bin
export ORACLE_SID=iasdb
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
# Customize the following two to your
environment
export DISPLAY=localhost:0.0
export MIDTIER=porta904.appsvr.localdomain.com
echo
echo Starting midtier instance with portal
echo Other components such as Forms, Reports
and Discoverer
echo should also be started here.
echo ------------------------------------
$ORACLE_HOME/opmn/bin/opmnctl startall
echo Sleeping 45 seconds
sleep 45
echo
echo Checking status of app server instances
echo ---------------------------------------
echo Getting current stat of $MIDTIER
# $ORACLE_HOME/dcm/bin/dcmctl getState -v -i
$MIDTIER
echo
echo Starting EM
echo -----------
$ORACLE_HOME/bin/emctl start em
# Restore the original path
export PATH=$SAVED_PATH
We also have scripts to stop the
infrastructure. Note that the stopping process is the exact inverse
of the start, shutting-down all the Oracle9iAS processes before
stopping the infrastructure database:
stopinfra.sh
#!/bin/bash
# script maintained by mikael.fransson@oracle.com
# Save the original path and restore it at
the end of the script
export SAVED_PATH=$PATH
# Customize ORACLE_HOME and ORACLE_SID to
your environment
export ORACLE_HOME=/home/oracle/infra904
export
PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/dcm/bin:$ORACLE_HOME/webcache/bin:
\$ORACLE_HOME/opmn/bin
export ORACLE_SID=iasdb
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
# Customize the following two to your
environment
export DISPLAY=localhost:0.0
export
INFRA=infra_904.appsvr.localdomain.com
echo
echo getting current state of $INFRA
$ORACLE_HOME/dcm/bin/dcmctl getState -v -i
$INFRA
echo Stopping all opmn managed processes in
$INFRA
$ORACLE_HOME/opmn/bin/opmnctl stopall
echo Sleeping 5
sleep 5
echo
echo Stopping Database Listener
echo -----------------
$ORACLE_HOME/bin/lsnrctl stop
echo
echo Stopping Database
echo -----------------
$ORACLE_HOME/bin/sqlplus /nolog<<EOF
connect / as sysdba
shutdown immediate
EOF
echo
echo Stopping Database Listener
echo -----------------
$ORACLE_HOME/bin/lsnrctl stop
echo
echo Stopping EM
$ORACLE_HOME/bin/emctl stop em<<EOF
<ias_admin_password>
EOF
# Restore the original path
export PATH=$SAVED_PATH
echo
------------------------------------------
echo
echo Listing processes owned by ias
ps -ef|grep ias
echo
echo Be Sure to kill any rogue processes
Note: The String <iasadmin_password> should
be replaced with your password.
Now that we have reviewed the infrastructure
administrative components, let?s turn our attention to the most
important infrastructure component, Oracle single-sign-on, commonly
called SSO.
This is an excerpt from "Oracle
10g Application Server Administration Handbook" by Don Burleson
and John Garmany.