HomeOracle Page 8 - The Oracle Application Server 10g Infrastructure
Repository Administration and Management - Oracle
If you need to handle the administration and management of Oracle Application Server 10g, this article covers the metadata repository (iasdb), the Single Sign-On (SSO) security framework, and the Oracle Application Server 10g Management Services. It is excerpted from chapter 2 of the book, Oracle Application Server 10g Administration Handbook, written by John Garmany and Donald Burleson (McGraw-Hill/Osborne, 2004; ISBN: 0072229586).
Because iasdb is an Oracle database, the Application Server 10g components rely on this database being available when they are started. After the components are started, the iasdb database can be stopped without adverse effects to OHS and Java. However, some Application Server 10g components, including SSO, Portal, and Wireless, will not be able to function without iasdb.
Hence, the iasdb database is a central point of failure for your Application Server 10g enterprise, and as the administrator, you should take steps to ensure continuous availability of the iasdb database. These steps may include the following:
Using the Oracle9i standby database (Data Guard)
Using Real Application Clusters (RAC)
Using triple mirroring of disks
While the Oracle documentation does not specifically mention the use of RAC as an availability option for Application Server 10g, using RAC for the repository can protect you from lockups 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 Application Server 10g, using a high-availability tool such as RAC guarantees continuous availability for the enterprise because the Oracle Transparent Application Failover (TAF) component will automatically continue processing any “in-flight” transactions if there is a failure on any iasdb instance.
Let’s review the basic infrastructure administration tasks.
Starting and Stopping the Infrastructure
While performing general maintenance and backups, the Application Server 10g administrator must stop and restart the infrastructure instance. Because of its tight coupling to important Application Server 10g 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, remember that iasdb must be running before other Application Server 10g 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 Application Server 10g 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 you use scripts to start and stop the Application Server 10g components. Application Server 10g uses a hierarchy of shell scripts to perform the start operations, with calls to Oracle executables at the lowest level (Figure 2-4).
Figure 2-4.The hierarchy of Application Server 10g scripts
Here is the main driving script to start all the Application Server 10g infrastructure and midtier components:
Note that this script calls the start scripts for the infrastructure followed by calls to start the midtier application. Let’s examine these scripts and their features. The start script for the infrastructure issues these Application Server 10g 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
4
Check status of infrastructure with DCM: $ORACLE_HOME/dcm/bin/dcmctl getState -v -i $INFRA
5.
Start OMS: $ORACLE_HOME/bin/emctl start oms
6. Start OEM: $ORACLE_HOME/bin/emctl start agent $ORACLE_HOME/bin/emctl start em
Here is the whole script, ready for you to use. 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, you invoke another script to start the midtier application. This script performs the following actions:
1. Start all OPM processes: $ORACLE_HOME/opmn/bin/opmnctl startall
3. 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
You also have scripts to stop the infrastructure. Note that the stopping process is the exact inverse of the start, shutting down all the Application Server 10g 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.