 |
|
opmnctl command tips
Oracle Application Server Tips by Burleson
Consulting |
Managing Oracle with opmnctl
The Oracle Process Managed Node (OPMN) uses
the opmctl utility is responsible for managing all Oracle9iAS server
processes. The powerful startall and stopall commands will manage
all Oracle9iAS server components. Unless a tier consists of a
stand-alone component such as the Web Cache, opmnctl should be used
rather than the separate component control program.
Start OPMN, DCM, and all components:
opmnctl
startall
Stop OPMN, DCM, and all components:
opmnctl
stopall
There may be times when you want to stop and
re-start all OPMN and DCM processes on your servers. The following
shell script will perform this function.
#!/bin/ksh
# First, we must set the environment . . . .
export ORACLE_BASE=/private/ias
# Use this ORACLE_HOME for midtier applications
#export ORACLE_HOME=$ORACLE_BASE/midtier
# Use this ORACLE_HOME for infra applications
export ORACLE_HOME=$ORACLE_BASE/infra
SET PATH=.;$PATH;%ORACLE_HOME%\dcm\bin\;%ORACLE_HOME%\j2ee\home\;
%ORACLE_HOME%\dap\bin\;%ORACLE_HOME%\ldap\odi\admin\;%ORACLE_HOME%\oca\bin\;%ORACLE_HOME%opmn\bin\
;%ORACLE_HOME%\portal\admin\plsql\sso\;%ORACLE_HOME%\sso\lib\;%ORALE_HOME%\uddi\lib\;%ORACLE_HOME%\
upgrade\;%ORACLE_HOME%\wireless\bin\
export ORACLE_SID=iasdb
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
#export DISPLAY=tor:2.0
# Loop through each host name . . .
for host in `cat ~oracle/.rhosts|cut -d"." -f1|awk '{print $1}'|sort
-u`
do
# Get the ORACLE_HOME on each Oracle9iAS server
home=`rsh $host "cat /etc/oratab|egrep ':N|:Y'|grep -v \*|cut -f1
/
d':'"``
# Execute opmctl to bounce all Oracle9iAS server processes:
rsh $host "$home/opmn/bin/opmctl stopall"
rsh $host "$home/opmn/bin/opmctl stopall"
done