Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation
Objectives Review 9iAS release 2 installation types Explain 9iAS architecture Introduce Oracle Enterprise Manager for 9iAS release 2 administration Review basic deployment of J2EE, PL/SQL and HTML applications Discuss basic troubleshooting techniques
9iAS Release 2 - Architecture Oracle 9iAS METADATA Repository Single Sign-On Oracle Internet Directory Oracle Management Server Portal and Wireless J2EE and WebCache Business Intelligence / Forms MIDDLE TIER 9I APPLICATION SERVER INFRASTRUCTURE browser
Installing 9i Application Server
Installation Options Oracle 9iAS Infrastructure (includes): Repository Database (9.0.1.3) Oracle Internet Directory (LDAP) server Single Sign-On HTTP Server 9i Application Server (Middle Tier) Runs all 9iAS release 2 applications Many applications connect to infrastructure 9iAS Developer Kits
Middle Tier Installation Options Infrastructure Not Required: J2EE and WebCache Infrastructure Required: Portal and Wireless Business Intelligence and Forms Discoverer Plus/Viewer Forms and Reports Unified Messaging
Managing 9iAS Release 2
Managing with Enterprise Manager Secure, graphical interface Performance metrics for all 9iAS components Wizard-based component configuration Access to error logs
Oracle Enterprise Manager
Managing the HTTP Server
Key URLs Oracle Enterprise Manager http://servername.com:1810 HTTP Server (midtier and infrastructure) http://servername.com:port Default unix midtier: http://servername.com:7778 Default unix single-sign on (infrastructure): http://servername.com:7777 Verify Installation with Demos: http://servername.com:port/iASDemos.htm Single Sign-on http://servername.com:port/pls/orasso Portal http://servername.com:port/pls/portal
Key Configuration Files ./Apache/Apache/conf/httpd.conf Contains HTTP Server directives Main Configuration File Three sections of the httpd.conf file: Directives that affect all http server processes and installation Directives that define the default apache server process Virtual hosts (running multiple web sites from single http server) ./Apache/modplsql/conf/dads.conf Contains database access descriptor information for mod_plsql applications including portal. Modified through OEM or manually.
Using the DCMCTL utility Distributed Configuration Management (DCM) Can be used alternatively to OEM Starting/Stopping Registering new applications Managing components Documented in Oracle9i Application Server Administrator's Guide Release 2
Starting/Stopping 9iAS Release 2
Start the Infrastructure Oracle 9iAS METADATA Repository Single Sign-On Oracle Internet Directory Oracle Management Server Portal and Wireless J2EE and WebCache Business Intelligence / Forms MIDDLE TIER 9I APPLICATION SERVER INFRASTRUCTURE browser
Start Infrastructure Step 1: Start TNS listener Step 2: Startup the Infrastructure DB $ sqlplus SQL*Plus: Release 9.0.1.3.0 - Production on Fri Oct 25 13:49:18 2002 (c) Copyright 2001 Oracle Corporation. All rights reserved. Enter user-name: sys/manager as sysdba Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 139233000 bytes Fixed Size 280296 bytes Variable Size 88080384 bytes Database Buffers 50331648 bytes Redo Buffers 540672 bytes Database mounted. Database opened.
Start Infrastructure Step 3: Start Oracle Internet Directory $ oidmon start Starting the Monitor process. $ oidctl server=oidldapd instance=1 configset=1 start $ ps -ef | grep oid oracle 29119 28264 0 13:52:59 pts/2 0:00 grep oid oracle 29115 29109 1 13:52:58 pts/2 0:01 oidldapd -p 4032 -i 1 -conf 1 -s port 4031 -sslenable 2 key=1907737401 oracle 29109 1 2 13:52:45 pts/2 0:02 oidmon start
Start Infrastructure Step 4: Start Oracle Enterprise Manager $ emctl start Waiting for EM to initialize ...Started Step 5: Start infrastructure instance In OEM, click infrastructure instance Click Start All
Start the Middle Tier Oracle 9iAS METADATA Repository Single Sign-On Oracle Internet Directory Oracle Management Server Portal and Wireless J2EE and WebCache Business Intelligence / Forms MIDDLE TIER 9I APPLICATION SERVER INFRASTRUCTURE browser
Start the Middle Tier Step 6: Start middle tier applications In OEM, click middle tier instance Click Start All
Stop the Middle Tier Oracle 9iAS METADATA Repository Single Sign-On Oracle Internet Directory Oracle Management Server Portal and Wireless J2EE and WebCache Business Intelligence / Forms MIDDLE TIER 9I APPLICATION SERVER INFRASTRUCTURE browser
Stop the Middle Tier Step 1: Stop Middle Tier components: From OEM, click ‘middle tier instance’, click ‘Stop All’ Unix: from a command prompt, verify that all processes in the middle tier have stopped. $ ps –ef | grep _apps Win2K: Verify that all middle tier services have stopped.
Stop the Infrastructure Oracle 9iAS METADATA Repository Single Sign-On Oracle Internet Directory Oracle Management Server Portal and Wireless J2EE and WebCache Business Intelligence / Forms MIDDLE TIER 9I APPLICATION SERVER INFRASTRUCTURE browser
Stop the Infrastructure Step 2: Stop Infrastructure components: From OEM, click ‘infrastructure’ instance, click ‘Stop All’ Unix: from a command prompt, verify that all processes in the middle tier have stopped. $ ps –ef | grep _infra Win2K: Verify that all middle tier services have stopped
Stop the Infrastructure Step 3: Stop OID If OID is still running, use the following commands to stop OID: $ oidctl server=oidldapd instance=1 configset=1 stop $ oidmon stop Monitor Process Terminated Step 4: Stop Enterprise Manager $ emctl stop
Stop the Infrastructure Step 5: Kill any remaining processes Step 6: Stop TNS listener $ lsnrctl stop LSNRCTL for Solaris: Version 9.0.1.3.0 - Production on 25-OCT-2002 13:44:15 Copyright (c) 1991, 2001, Oracle Corporation. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC))) The command completed successfully
Stop the Infrastructure Step 7: Shutdown infrastructure database $ sqlplus SQL*Plus: Release 9.0.1.3.0 - Production on Fri Oct 25 13:45:17 2002 (c) Copyright 2001 Oracle Corporation. All rights reserved. Enter user-name: sys/manager as sysdba Connected to: Oracle9i Enterprise Edition Release 9.0.1.3.0 - Production With the Partitioning option JServer Release 9.0.1.3.0 - Production SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down.
Monitoring 9iAS Server Activity
Enterprise Manager Instance Management
Manage Your OC4J Apps
Web Application Deployment with HTML, Java, and PL/SQL
Applications are deployed to middle tier Oracle 9iAS METADATA Repository Single Sign-On Oracle Internet Directory Oracle Management Server Portal and Wireless J2EE and WebCache Business Intelligence / Forms MIDDLE TIER 9I APPLICATION SERVER INFRASTRUCTURE browser
HTML Site Deployment
Identify Document Root
Deploying an html web site Create a subdirectory below ‘document root’ of middle tier application server Copy all application html and image files to new directory. $ mkdir MyNewApp $ cp index.html ./MyNewApp $ cp *.html ./MyNewApp
Run the web app…
Create a Java App Developers build an application using JDeveloper or other Java development tools Developers may package the application to: .ear file [Enterprise ARchive] – J2EE Packaged Application. May contain XML, .java, .war files, classes .war file [Web ARchive] – Packaged JSPs and Servlets
Deploying a Java App (using a WAR file) In OEM, select middle tier instance Click ‘Create OC4J Instance’ Add ‘Instance Name’ Click ‘Create’ New OC4J app will appear in the System Components list of middle tier
OEM System Components
Deploy WAR (con’d) Enter path to WAR file or use the Browse button Enter Application Name In “Map to URL” Enter a virtual path (i.e. MyDemo) Click Deploy
Deploy Java App (con’d) Receive success message During deployment WAR files are ‘wrapped’ to EAR files before deployment You are returned to administration screen in OEM for your application. Click ‘Start’ to start the OC4J application You can then run the application from the browser: (i.e. http://www.yourdomain.com:7778/MyDemo)
Deploy a PL/SQL Application Requires Database Access Descriptor (DAD) configuration PL/SQL packages, procedures in the database using web toolkit
Sample Stored Procedure In a schema, create a stored procedure: connect scott/tiger create or replace procedure hello_oracle is begin htp.print ('<h1>Hello oracle</h1>'); end; / Setup a tnsnames.ora entry if one does not exist in middle tier to target database
Define the DAD in OEM Access the middle tier instance Click ‘HTTP Server’ Click ‘PL/SQL Properties’ under Administration Click ‘Create’ in DAD Status
Define the DAD in OEM (con’d) Step 1 – Create DAD: DAD Type Portal or General Step 2 – Username, password, connect string Authentication Mode = Basic Finish & Restart HTTP Server
Run the PL/SQL App (con’d) Run the url: http://www.yourdomain.com:7778/hello_oracle/hello_oracle
Troubleshooting
Troubleshooting 9iAS rel2 I can’t connect!
Troubleshooting Can you connect from your browser to the middle tier http server? http://hostname:port/ Is network connectivity available to the server? ‘ping servername’ Does sql*net connectivity exist between the middle tier and infrastructure?
Troubleshooting Is Oracle Internet Directory running? $ ps -ef | grep oid oracle 21914 1 0 Oct 04 ? 0:05 /d01/oracle/product/9ias_infra/bin/oidmon start oracle 21979 21914 0 Oct 04 ? 0:07 oidldapd -p 4032 -i 1 -conf 0 –s port 4031 -sslenable 2 key=1436210937 Can you connect to the infrastructure database? Attempt a client/server connection to the database verifying the listener is listening for incoming requests Connect to the database using sql*plus
Win2K Services Panel Are your middle tier and infrastructure services running?
Using RDA Remote Diagnostic Agent from Oracle Support Gathers Oracle environment information Gathers hardware and operating system information Download RDA from metalink.oracle.com Set environment to middle tier or infrastructure $ORACLE_HOME Run rda.sh script Unix Tip: Create a directory beneath document root and copy RDA_OUTPUT files
Using RDA (continued) http://servername:port/rda/RDA__START.htm
Review Error Logs Middle Tier from $ORACLE_HOME : ./Apache/Apache/logs/error_log ./opmn/logs/ons.log ./opmn/logs/ipm.log ./webcache/logs/event_log ./webcache/logs/access_log
Review Error Logs Infrastructure from $ORACLE_HOME: ./Apache/Apache/logs/error_log ./ldap/log/* ./sysman/log/* ./opmn/logs/ons.log ./opmn/logs/ipm.log
Where to go from here... Oracle Education: http://technet.oracle.com Oracle 9iAS Basic Administration – 5 days Oracle 9iAS: Advanced Administration for J2EE and Web Cache – 2 days Oracle9i: Administer Oracle Internet Directory – 3 days http://technet.oracle.com http://metalink.oracle.com Discussion Groups groups.google.com technet discussion forums
Tracie Thomas – thomas@mfgsys.com Thank You!!!! Tracie Thomas – thomas@mfgsys.com