57
Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

  • View
    218

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Oracle 9I Application ServerRelease 2 – Basic Administration

Tracie A. Thomas

MFG Systems Corporation

Page 2: 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

Page 3: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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

INFRASTRUCTUREbrowser

Page 4: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Installing 9i Application Server

Page 5: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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

Page 6: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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

Page 7: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Managing 9iAS Release 2

Page 8: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Managing with Enterprise Manager• Secure, graphical interface

• Performance metrics for all 9iAS components

• Wizard-based component configuration

• Access to error logs

Page 9: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Oracle Enterprise Manager

Page 10: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Managing the HTTP Server

Page 11: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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

Page 12: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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.

Page 13: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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

Page 14: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Starting/Stopping 9iAS Release 2

Page 15: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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

INFRASTRUCTUREbrowser

Page 16: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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 sysdbaConnected to an idle instance.SQL> startupORACLE instance started.Total System Global Area 139233000 bytesFixed Size 280296 bytesVariable Size 88080384 bytesDatabase Buffers 50331648 bytesRedo Buffers 540672 bytesDatabase mounted.Database opened.

Page 17: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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 -sport 4031 -sslenable 2 key=1907737401 oracle 29109 1 2 13:52:45 pts/2 0:02 oidmon start

Page 18: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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

Page 19: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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

INFRASTRUCTUREbrowser

Start the Middle Tier

Page 20: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Start the Middle Tier

• Step 6: Start middle tier applications– In OEM, click

middle tier instance

– Click Start All

Page 21: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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

INFRASTRUCTUREbrowser

Stop the Middle Tier

Page 22: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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.

Page 23: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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

INFRASTRUCTUREbrowser

Page 24: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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

Page 25: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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

Page 26: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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

Page 27: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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 sysdbaConnected to:Oracle9i Enterprise Edition Release 9.0.1.3.0 - ProductionWith the Partitioning optionJServer Release 9.0.1.3.0 - Production

SQL> shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.

Page 28: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Monitoring 9iAS Server Activity

Page 29: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Enterprise Manager Instance Management

Page 30: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Manage Your OC4J Apps

Page 31: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Web Application Deployment with HTML, Java, and PL/SQL

Page 32: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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

INFRASTRUCTUREbrowser

Applications are deployed to middle tier

Page 33: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

HTML Site Deployment

Page 34: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Identify Document Root

Page 35: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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

Page 36: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Run the web app…

Page 37: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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

Page 38: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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

Page 39: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

OEM System Components

Page 40: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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

Page 41: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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)

Page 42: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Deploy a PL/SQL Application• Requires Database Access

Descriptor (DAD) configuration

• PL/SQL packages, procedures in the database using web toolkit

Page 43: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Sample Stored Procedure• In a schema, create a stored procedure:

connect scott/tigercreate or replace procedure hello_oracle isbegin htp.print ('<h1>Hello oracle</h1>');

end;/

• Setup a tnsnames.ora entry if one does not exist in middle tier to target database

Page 44: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Define the DAD in OEM

• Access the middle tier instance

• Click ‘HTTP Server’

• Click ‘PL/SQL Properties’ under Administration

• Click ‘Create’ in DAD Status

Page 45: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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

Page 46: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Run the PL/SQL App (con’d)• Run the url:http://www.yourdomain.com:7778/hello_oracle/

hello_oracle

Page 47: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Troubleshooting

Page 48: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Troubleshooting 9iAS rel2

I can’t connect!

Page 49: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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?

Page 50: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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

Page 51: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Win2K Services Panel

• Are your middle tier and infrastructure services running?

Page 52: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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

Page 53: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Using RDA (continued)

• http://servername:port/rda/RDA__START.htm

Page 54: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

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

Page 55: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Review Error Logs

Infrastructure from $ORACLE_HOME:• ./Apache/Apache/logs/error_log• ./ldap/log/*• ./sysman/log/*• ./opmn/logs/ons.log• ./opmn/logs/ipm.log

Page 56: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Where to go from here...

• Oracle Education:– 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

Page 57: Oracle 9I Application Server Release 2 – Basic Administration Tracie A. Thomas MFG Systems Corporation

Thank You!!!!

Tracie Thomas – [email protected]