HomeOracle Page 14 - Oracle Application Server 10g Architecture and Administration
EM Commands with emctl - Oracle
Get an overview of the Oracle Application Server 10g architecture, its functional components, the administrative tools for application development, and examples of commands that are used to perform frequent Application Server 10g administrative functions. This chapter is from the book, Oracle Application Server 10g Administration Handbook, by John Garmany and Donald K. Burleson (McGraw-Hill/Osborne, ISBN: 0072229586, 2004).
The emctl utility is used to manage all aspects of the Enterprise Manager console. While the EM console is greatly useful for managing components of Application Server 10g, the console itself must be managed. For example, all EM servers must have a running EM agent, and the emctl command-line utility can be used to start or stop OEM, OMS, or any OEM agent. As mentioned earlier in the chapter, OMS (Oracle Management Server) is used with Oracle Enterprise Manager for centralized management of all Oracle products installed.
EM Console Commands for Application Server 10g
emctl start em emctl stop em emctl status em
OEM Agent Commands
emctl start agent emctl stop agent emctl status agent
OMS Commands
emctl start oms emctl stop oms emctl status oms
Managing Application Server 10g with opmnctl The Oracle Process Manager and Notification (OPMN) uses the opmnctl utility to manage all Oracle Application Server 10g server processes. The powerful startall and stopall commands will manage all server components. Unless a tier consists of a standalone 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 restart all OPMN and DCM processes on your servers. The following shell script will perform this function:
#!/bin/ksh #*********************************************** # # Copyright (c) 2003 by Donald K. Burleson # # Bounce all Oracle Application Server 10g server processes # #************************************************ # 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%dcmbin;%ORACLE_HOME%j2eehome; %ORACLE_HOME%dapbin;%ORACLE_HOME%ldapodiadmin;%ORACLE_HOME%ocabin;%ORACLE_HOME%opmn bin;%ORACLE_HOME%portaladminplsqlsso;%ORACLE_HOME%ssolib;%ORALE_HOME%uddilib ;%ORACLE_HOME%upgrade;%ORACLE_HOME%wirelessbin 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 Oracle Application Server 10g server home=`rsh $host "cat /etc/oratab|egrep ':N|:Y'|grep -v *|cut -f1 / d':'"`` # Execute opmnctl to bounce all Oracle Application Server 10g server processes: rsh $host "$home/opmn/bin/opmnctl stopall" rsh $host "$home/opmn/bin/opmnctl stopall" done
This chapter is from Oracle Application Server 10g Administration Handbook, by Garmany and Burleson. (McGraw-Hill/Osborne, 2004, ISBN: 0072229586). Check it out at your favorite bookstore today. Buy this book now.