Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 

 

 

Managing Oracle9iAS with EM

Oracle Application Server Tips by Burleson Consulting

The Oracle9iAS Enterprise Manager Console is the central management component for Oracle9iAS.  The core of Oracle9iAS EM is the EM console page.  From the EM central console you can manage most of the areas of Oracle9iAS on multiple servers.

If you have installed the infrastructure component of Oracle9iAS (iasdb database repository), then the default EM console page will be the EM Farm page.   The Farm page is the highest level of the EM pages and is used to administer all instances within your Oracle9iAS configuration.  As a quick review, let make sure that we understand the Oracle9iAS component hierarchy, from the bottom-up:

  • Instances - In Oracle9iAS, each J2EE app server or infrastructure is called an ?instance? (not to be confused with an Oracle database instance, which is quite different). 

  • Clusters - In Oracle9iAS a ?cluster? is an arbitrary collection of instances. 

  • Farms - In Oracle9iAS, a ?farm? is a collection of instances and clusters that comprise your Oracle9iAS system and share a common repository database (iasdb). 

As we see, Oracle9iAS defines a hierarchy of components, instances, clusters and farms. Each farm may have many clusters, each cluster may have many instances and each instance may have many Oracle9iAS components.  It is your job as the Oracle9iAS administrator to configure your components, instances clusters and farms according to the processing requirements of your application.

The purpose of the Oracle9iAS EM Farm page is to sever as the master console and display summary information about each instance and cluster within the farm (Figure 1.13)

Figure 13: The main EnterpriseManager console screen for Oracle9iAS

Remember, each instance within the Farm page is an independent J2EE app server or an infrastructure, and the farm page allows you to drill-down and see the details for each instance using the EM instance manager page.  Using the EM farm page you can also define new clusters and assign instances to clusters.  In Oracle9iAS parlance a ?standalone? instance is a J2EE app server, belonging to a Farm, which has not been assigned to a cluster.  A cluster is two or more identically configured app server instances.  To assign an instance to a cluster, you simply choose it and click the ?join cluster? button.

Next, let?s step-down one level and look at what we see when we drill-down into an instance and see the EM instance manager page.

Oracle9iAS instance manager home page

The Oracle9iAS instance manager page is somewhat of a misnomer.  To the Oracle DBA, an instance is a running Oracle database, while to the Oracle9iAS administrator an instance refers to a J2EE app server or an infrastructure within their Oracle9iAS farm.

For each instance, the Oracle9iAS Instance Manager page allows you to manage all of the Oracle9iAS components.  When you select a server from the OEM farm page you get the Instance Manager page with details on all components on that server (Figure 1.14).  The top of the page displays the host name and status of the server.  We also see CPU and RAM memory usage for the server. The bottom half of the page shows all of the Oracle9iAS components on that server. 

For each component we see the current status (up or down), the start time for the component and the relative amount of CPU and RAM usage for each component. By selecting a component and clicking the management buttons you can start, stop, enable, disable and configure each component on the instance.  Let?s take a look at the links on this page. 

  • Infrastructure button ? The infrastructure link allows you to associate App Servers (?instances?) components with database schemas to include associating a component to a schema in a database that is not in the farm?s infrastructure. This allows you to share schemas across instances that do not belong to a particular farm.

  • Logs button - On the top-right of this page we can press the ?logs? link to see all of the log files for each component.

  • J2EE deployment button ? In the home tab we can click the ?J2EE Applications? to see a list of all J2EE applications that are deployed on this server.

  • Ports button ? This link displays the port numbers for each server component and allows you to change the port number for any component on the instance (server).

Figure 14: The EM console Instance screen for Oracle9iAS

While the EM Console is a popular way of managing Oracle9iAS, we must remember that Oracle9iAS also provides a wealth of command-line utilities.  Let?s do a quick review of the Oracle9iAS command line utilities.

Managing Oracle9iAS with command-line interface

Many experienced Oracle9iAS administrators prefer to use the command-line interface instead of EM. Remember, at the lowest level EM generates the commands and parameters for Oracle9iAS control files, and knowledgeable Oracle9iAS administrators do not need a command and parameter generation features of EM because they already know the commands and parameters.

The commands line interfaces are spread across many file locations and you will find Oracle9iAS command-line programs in the following directories on your operating system:

- $ORACLE_HOME/bin/
- $ORACLE_HOME/dcm/bin/
- $ORACLE_HOME/j2ee/home/
- $ORACLE_HOME/ldap/bin/
- $ORACLE_HOME/ldap/odi/admin/
- $ORACLE_HOME/oca/bin/
- $ORACLE_HOME/opmn/bin/
- $ORACLE_HOME/portal/admin/plsql/sso/
- $ORACLE_HOME/sso/lib/
- $ORACLE_HOME/uddi/lib/
- $ORACLE_HOME/upgrade/
- $ORACLE_HOME/wireless/bin/

NOTE: To locate all of the command-line programs you should always include these directories in your $PATH variable to ensure that you locate all of the Oracle9iAS command utilities.  In UNIX, you can place the following command in your .profile (ksh), .cshrc (csh), or bash.

The Oracle command line utilities will be mentioned throughout this text, but let?s just take a quick tour so you can see how the command line interface is used to manage Oracle9iAS.  Table 1.1 shows all 59 of the command line executables with Oracle9iAS.

Category

Command

Usage

9iAS

iasua.sh

This is the upgrade assistant executable.

DCM

dcmctl

The distributed configuration manager is for managing Oracle9iAS components.

Discoverer

eulbuilder.jar

This is the Oracle9iAS Discoverer end-user-layer Java command-line interface.

DMS

dmstool

The dmstool is used for viewing performance metrics.

Forms

fplsqlconv90

The fplsqlconv90 executable us used to update PL/SQL for Forms6i

Forms

ifbld90

The ifbld90 executable is used to start Forms Developer

Forms

ifcmp90

The ifcmp90 executable starts the Forms Compiler.

Forms

iff2xml90

This will traverse a module object hierarchy and produce an XML representation.

Forms

ifweb90

The ifweb90 will allow you to preview a form in a Web browser.

Forms

ifxml2f90

This will take a Forms XML format and convert it back into a module.

Forms

ifxmlv90

This is the XML validator to validate .xml files against the Forms XML Schema.

J2EE

ojspc

This is the JSP back precompiler.

J2EE

admin.jar

This tool is only used in the sample OC4J Stand alone installation. Do not use this command.

J2EE

jazn.jar

This jar file manages both XML-based and LDAP-based JAAS data.

LDAP

ldapadd

This is the OID add utility for adding entries, their object classes, and attributes.

LDAP

ldapaddmt

Just like ldapadd, but with support for multiple threads for adding entries concurrently.

LDAP

ldapbind

The ldapbind determines if you can authenticate a client to a server.

LDAP

ldapcompare

Compares your attribute values with an OID entry.

LDAP

ldapdelete

Remove entries from OID.

LDAP

ldapmoddn

Modifies the DN or RDN of an Oracle Internet Directory entry.

LDAP

ldapmodify

Modifies OID attributes

LDAP

ldapmodifymt

Modify several OID entries concurrently.

LDAP

ldapsearch

Search and retrieve specific OOID entries.

LDAP

bulkdelete.sh

Delete a whole OID sub-tree.

LDAP

bulkload.sh

Creates OID  entries from data residing in or created by other applications.

LDAP

catalog.sh

Add and delete OID catalog entries.

LDAP

hiqpurge.sh

Move OID changes from the human intervention queue to the purge queue.

LDAP

hiqretry.sh

Move OID changes from the human intervention queue to the retry queue.

LDAP

oidstats.sh

Analyzes ODS schema objects to estimate statistics.

LDAP

remtool

Used with a OID replication failure.

OCA

ocactl

The Oracle9iAS Certificate Authority administration tool.

OEM utility

emctl

Starts, stop, and manages security for OEM.

OID

bulkmodify

Modify a large number OID entries.

OID

dipassistant

Used with the Oracle Directory Integration and Provisioning platform.

OID

ldifmigrator

Migrate data from application-specific repositories into Oracle Internet Directory.

OID

ldifwrite

Converts OID data to LDIF.  This makes that information available for loading into a new node in a replicated directory or into another node for backup storage.

OID

oidctl

Start and stop Oracle Internet Directory.

OID

oidmon

Manage OID processes.

OID

oidpasswd

Change the OID database password.

OID

oidprovtool

Administer provisioning profile entries in OID directory.

OID

oidreconcile

Synchronize Oracle Internet Directory entries.

OID

resetiASpasswd.sh

Reset the internal password that instances use to authenticate themselves with OID.  It resets the password to a randomly generated password.

OID

schemasync

Synchronizes schema elements between OID  and third-party LDAP directories.

OID

stopodis.sh

Starts the directory integration and provisioning server without using oidctl executable.

OPM

opmnctl

Start, stop, and get status on OPMN-managed processes.  This is the main tool for starting and stopping an instance.

OSSA

ossoca.jar

Configures additional languages for Oracle9iAS Single Sign-On.

Reports

rwbuilder

Invokes the Reports Builder.

Reports

rwcgi

Translates and delivers information between HTTP and the Reports Server.

Reports

rwclient

Parses and transfers a command line to the specified (or default) Reports Server.

Reports

rwconverter

Converts report definitions or PL/SQL libraries from one storage format to another.

Reports

rwrun

Runs a report using the Oracle9iAS Reports Services in-process server.

Reports

rwserver

Invokes the Reports Server.

SSO

ssocfg.sh

Updates host, port, and protocol of SSO URL.

SSO

ssooconf.sql

Points SSO to a different OID.

SSO

ossoreg.jar

This is the mod_osso registration tool.

Web cache

webcachectl

Manages web cache processes, including the administration server process, cache server process, and auto-restart process.

Web Services

uddiadmin.jar

Managse the UDDI registry.

Wireless

portalRegistrar.sh

Reregisters the mobile gateway parameter with Oracle9iAS Portal.

Wireless

reRegisterSSO.sh

Reregisters the Wireless Single Sign-On partner application with the Single Sign-On server.

Table 1 ? Oracle9iAS command-line utilities

Knowing these commands and their parameters for Oracle9iAS is very useful for automating Oracle9iAS administration functions and creating batch scripts.  These Oracle9iAS commands can easily be placed into scripts (shell scripts in Linux and UNIX) that can be executed to automate routine Oracle9iAS management tasks.

While each product with Oracle9iAS has control files, there are three main command-line interfaces within Oracle9iAS:

opmctl ? This is the control interface for the Oracle9iAS Process Management Notification (OPM) component.  The opmctl interface is located at $ORACLE_HOME/opmn/bin/opmctl.  The opmctl interface provides a startall and stopall argument that will manage all of the Oracle9iAS server processes.

dcmctl - This is the control interface for the Oracle9iAS Distributed Configuration Management (DCM) component.  The dcmctl interface is located at $ORACLE_HOME/dcm/bin/dcmctl.

ecmctl ? This is the Enterprise manager console utility.  The ecmctl executable is located in $ORACLE_HOME/bin/ecmctl.  It is used for managing the OEM agents, changing OEM passwords, starting the OEM console and other miscellaneous tasks.

These command-line interfaces are critical for Oracle9iAS administrative scripts.  Let?s take a look at how command line interfaces are used as scripts.

Using scripts to manage Oracle9iAS

You can automate many areas of Oracle9iAS administration using scripts.  Here is an example of a command list to start the iasdb database, the listener, the infrastructure instance, a midtier instance and the Enterprise Manager website on both instances.

echo Setting Env for Infrastructure
source envInfra.sh
echo Starting Listener
$ORACLE_HOME/bin/lsnrctl start
echo Starting Database
$ORACLE_HOME/bin/sqlplus /nolog<<EOF
connect / as sysdba
startup
EOF
echo Starting all opmnctl controlled processes
$ORACLE_HOME/opmn/bin/opmnctl startall
echo Starting the EM website
#$ORACLE_HOME/bin/emctl start em
echo Setting Env for MidTier Instance
source envMidtier.sh
echo Starting all opmnctl controlled processes
$ORACLE_HOME/opmn/bin/opmnctl startall
echo Starting the EM website
#$ORACLE_HOME/bin/emctl start em
echo Startup Completed

By themselves, the command list is not very useful, but it becomes very powerful when embedded into a shell script. The source envMidtier.sh  statement changes the ORACLE_HOME environmental variable.  Each instance or Oracle9iAS must be installed it it?s own ORACLE_HOME.  This is covered in the Chapter 2. Because The Oracle9iAS command line utilities exist in many locations, it is critical that you set-up your OS environment so that your scripts will be able to locate all of the utilities.  Here are examples of the proper PATH commands for UNIX and Windows.  These are normally placed in the startup shell script to be executed at sign-on time.

UNIX PATH setup
ORACLE_HOME=/u01/app/oracle/product/9.2.0
export ORACLE_HOME
PATH=.:$PATH:.;$ORACLE_HOME/dcm/bin/:$ORACLE_HOME/j2ee/home/:$ORACLE_HOME/ldap/bin/:$ORACLE_HOME/ldap/odi/
admin/:$ORACLE_HOME/oca/bin/:$ORACLE_HOME/opmn/bin/:$ORACLE_HOME/portal/admin/plsql/sso/:$ORACLE_HOME/sso/
lib/:$ORACLE_HOME/uddi/lib/:$ORACLE_HOME/upgrade/:$ORACLE_HOME/wireless/bin/

Windows PATH setup

Set ORACLE_HOME=c:\oracle\ora92
SETPATH=.;$PATH;%ORACLE_HOME%\dcm\bin\;%ORACLE_HOME%\j2ee\home\;%ORACLE_HOME%\ldap\bin\;%ORACLE_HOME%\ldap\odi\
admin\;%ORACLE_HOME%\oca\bin\;%ORACLE_HOME%\opmn\bin\;%ORACLE_HOME%\portal\admin\plsql\sso\;%ORACLE_HOME%\sso\
lib\;%ORACLE_HOME%\uddi\lib\;%ORACLE_HOME%\upgrade\;%ORACLE_HOME%\wireless\bin\

Once we have established the PATH variable we are able to create shell script that can be submitted in batch mode (in UNIX with the nohup command) to automate Oracle9iAS administrative tasks.  For example, an Oracle9iAS management shell script could be scheduled in the UNIX crontab to perform a scheduled shutdown of all Oracle9iAS services.

Of course, the PATH variable is only a part of an Oracle9iAS script, and the complete environment including ORACLE_BASE, ORACLE_HOME and ORACLE_SID must be enabled.  The env.ksh script shows a common environmental setting for Oracle9iAS command scripts.  Note that $ORACLE_HOME is set to ORACLE_BASE/midtier for mid-tier command scripts and ORACLE_BASE/infra for infrastructure command scripts.  Every Oracle9iAS Instance must be installed in a unique ORACLE_HOME and startup/shutdown scripts must set the environment variables for that instance.

env.sh
#!/bin/ksh
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
SETPATH=.;$PATH;%ORACLE_HOME%\dcm\bin\;%ORACLE_HOME%\j2ee\home\;%ORACLE_HOME%\ldap\bin\;%ORACLE_HOME%\ldap\odi\
admin\;%ORACLE_HOME%\oca\bin\;%ORACLE_HOME%\opmn\bin\;%ORACLE_HOME%\portal\admin\plsql\sso\;%ORACLE_HOME%\sso\
lib\;%ORACLE_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

echo ORACLE_HOME : $ORACLE_HOME
echo ORACLE_SID  : $ORACLE_SID
echo DISPLAY     : $DISPLAY
echo Set PATH and LD_LIBRARY_PATH

Here is a script to submit when there is a problem with OHS and you need to re-start it.  Some Oracle9iAS administrators place Apache user-exit code to automate the bouncing of the OHS.  For example, if an external connection fails to attach to an OHS listener, after 10 seconds the following code could be automatically invoked to bounce OHS.

bounce_ohs.ksh
#*****************************************************************
# Copyright (c) 2003 by Donald K. Burleson
#
#*****************************************************************
# Exit if no first parameter $1
if [ -z "$1" ]
then
   echo "ERROR: Please pass a valid ORACLE_SID to this script"
   exit 99
fi
# Validate Oracle
TEMP=`cat /etc/oratab|grep \^$1:|cut -f1 -d':'|wc -l`
tmp=`expr TEMP`            # Convert string to number
if [ $tmp -ne 1 ]
then
   echo
   echo "ERROR: Your input parameter $1 is invalid.  Please Retry"
   echo
   exit 99
fi

if [ `whoami` != 'oracle' ]
then
   echo "Error: You must be oracle to execute the script.  Exiting."
   exit
fi
# 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
SETPATH=.;$PATH;%ORACLE_HOME%\dcm\bin\;%ORACLE_HOME%\j2ee\home\;%ORACLE_HOME%\ldap\bin\;%ORACLE_HOME%\ldap\odi\
admin\;%ORACLE_HOME%\oca\bin\;%ORACLE_HOME%\opmn\bin\;%ORACLE_HOME%\portal\admin\plsql\sso\;%ORACLE_HOME%\sso\
lib\;%ORACLE_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
#************************************************************
#  Execute the DCM commands to bounce the OHS
#************************************************************
$ORACLE_HOME/dcm/bin/dcmctl stop -ct ohs
$ORACLE_HOME/dcm/bin/dcmctl start -ct ohs
$ORACLE_HOME/dcm/bin/dcmctl start -co OC4J_Portal

As we can see, these shell scripts with embedded Oracle9iAS commands are extremely useful for automatic Oracle9iAS administration.  As each component is discussed in later chapters, detailed scripts will be introduced to assist with the administration of that component.  Here are some other examples of commands that the Oracle9iAS administrator can place inside scripts.

Let?s take a quick look at Oracle9iAS commands that are used to perform frequent Oracle9iAS administrative functions.


This is an excerpt from "Oracle 10g Application Server Administration Handbook" by Don Burleson and John Garmany.
 

If you like Oracle tuning, you may enjoy the new book "Oracle Tuning: The Definitive Reference", over 900 pages of BC's favorite tuning tips & scripts. 

You can buy it direct from the publisher for 30%-off and get instant access to the code depot of Oracle tuning scripts.


 

 
��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational