2004_paper_oracle Application Server 10g Basic Administration

download 2004_paper_oracle Application Server 10g Basic Administration

of 14

Transcript of 2004_paper_oracle Application Server 10g Basic Administration

  • 8/3/2019 2004_paper_oracle Application Server 10g Basic Administration

    1/14

    Application Server and Web Services

    Paper #13005

    Page 1

    OORRAACCLLEEAAPPPPLLII CCAATTII OONN SSEERRVVEERR1100GG::BBAASSII CCAADDMMII NN II SSTTRRAATTII OONN

    T racie A . Owen, M F G Systems Corporation

    INTRODUCTION Following Oracle Corporation's focus on web technologies, companies are opting to web-enable their existing applications aspart of the traditional upgrade process. Other companies are purchasing vendor-supplied web applications built with Oracleproducts. An essential component to Oracle's web-enabled applications is the Oracle Application Server 10g (OracleAS 10g).Support, maintenance, and problem resolution are often falling into the responsibility of the database administrator or otheroperational support personnel. Frequently, the person responsible for support has litt le or no web server support experience.This paper will provide an introduction to the architecture of OracleAS 10g, the tools available for administration and basictroubleshooting. Additionally, the paper will cover deployment of simple java, Oracle PL/ SQL and HTML applications.

    ORACLEAS10G ARCHITECTURE

    ARCHITECTURE OVERVIEW

    In a traditional internet computing architecture, there is:

    a first tier is the client, which can run on a PC through a web browser, a mobile device such as a PDA or cell phone. Theuser can be anywhere in the world, mobile or LAN, internet or intranet.

    a middle tier, which is typically a webserver or application server. This middletier software serves applications from acentral location to the clients, interfacingfrom the client to a backend data store. Itcan contain a load balancing router,

    clustering software, and one or moreapplication servers.

    a third tier, which is the database, whichhouses the application data. The platformof each tier, including hardware andoperating system, is independent of theother tiers. Because of the dataprotection requirements, the data store isoften protected by one or more firewalls

    from the internet.

    Clients connect through a firewall from the internet to the middle tier application server. The application server, when itneeds to read from or write to the database, will connect to the database through another firewall. The area that contains theapplication servers is called a demilitarized zone (DMZ). The DMZ sits between the corporate intranet and the internet, andtherefore can restrict incoming requests to the corporate LAN for added security.

    Figure 1 - Tradit ional Internet Application Architecture

  • 8/3/2019 2004_paper_oracle Application Server 10g Basic Administration

    2/14

    Application Server and Web Services

    Paper #13005

    Page 2

    ORACLEAS10G ARCHITECTURE

    OracleAS 10g Enterprise Edition includes Oracle Portal and Wireless, J2EE, and business intelligence applicationdevelopment/ deployment.

    OracleAS 10g also utilizes an infrastructure tier. For the applications running from the middle tier, the infrastructure provides

    single sign-on capabilities, a management repository for OracleAS 10g components in a dedicated Oracle database, and amanagement server. Many of the middle tier applications will retrieve data from or write data to an Oracle database.

    Multiple application server installations can exist on one or more servers. Each application server can leverage a singleinfrastructure.

    INFRASTRUCTURE COMPONENTS

    The OracleAS 10g infrastructure provides a centralized location for management capabilities of your OracleAS 10genvironment. The infrastructure includes the following components.

    Oracle Identity Management, which consolidates management of your application users. Oracle Identity Managementleverages the Oracle database, listener, and HTTP server for providing single sign-on capabilities.

    Oracle Enterprise Manager (OEM) Application Server Control for OracleAS 10g administration

    A Multi-purpose HTTP Server, which is driven by an Apache web server.

    A version 9.0.1.5 Oracle database, which contains metadata for many of the OracleAS 10g components.Applications which are configured to utilize single sign-on functionality of OracleAS 10g allow users to log-in once forauthentication and authorization to multiple applications. A key component to Oracle Identity Management is OraclesLDAP3 compliant Oracle Internet Directory (OID) server. OID can be configured for SSL and can run on ports compliantwithin the corporations business requirements. OID can also be configured to replicate between other LDAP3 compliantdirectory servers to provide simplified enterprise-wide corporate directory services.

    M IDDLE TIER COMPONENTS

    The middle tier of OracleAS 10g is where your user community will connect and run applications. OracleAS 10g offers a highperformance J2EE compliant server for java application deployment. Additional installations options, and of course increasedlicense costs, include Oracle Portal with a wireless option, and an extensive Business Intelligence product set. All of these

    products can be launched from a web browser.An infrastructure can support one or more middle tiers installed on remote servers within the corporate LAN. Therefore, newOracleAS 10g middle tier installations can leverage an existing infrastructure. The current release of OracleAS 10g even allowsmiddle tier installations to be wired to a 9iAS release 2 infrastructure.

    INSTALLATION

    THE IN STALLATION TEAM

    The installation team can involve resources with varying areas of expertise.

    Oracle Specialist: Responsibilities include both application server and database technologies. This person will beresponsible for architecting the target server environment, installing and configuring the OracleAS 10g software,developing backup and recovery strategies, performing administration and troubleshooting.

    Network Specialist: Responsibilit ies include configuring the servers on the corporate network, firewall if applicable, androuters if applicable. This person will provide support for any connectivity issues which may arise in the OracleAS 10genvironment.

    Operating System Specialist: Responsibilities include applying patches to the operating system prior to installation asrequired. Additionally, the Operating System Specialist will make kernel changes, create the software owner accounts, anddevise an appropriate file system layout strategy.

  • 8/3/2019 2004_paper_oracle Application Server 10g Basic Administration

    3/14

    Application Server and Web Services

    Paper #13005

    Page 3

    PRE-INSTALL NOTES

    As with leading-edge technology products, installation of OracleAS 10g can be quite cumbersome, requiring multiple attempts,and causing a few gray or lost hairs until a working product installation is obtained. Following a few recommendations before

    beginning any installation of OracleAS 10g can save time and reduce stress.Read the Release Notes including any available addendum. Failed installations due to not meeting minimum operating systempatch requirements or resource requirements can be costly. Not only will you have wasted time during the installation but youwill waste additional time cleaning up your server for the reinstallation. For each installation, files are written to an OracleInventory directory, your target software installation directory. Additional f iles, depending on your environment, will bewritten to / var/ opt/ oracle and / usr/ local/ bin. For example, in the current (OracleAS 10g) Release Notes, there are notesregarding how to appropriately change kernel parameters, known issues, and steps to avoid errors during installation.

    Read the Installation Guide in advance. The Installation Guide not only walks you through installation, but also includesoperating system patch requirements, hardware requirements, database compatibility, and a wealth of information you willneed to be aware of before beginning installation.

    For OracleAS 10g, there are two installation guides the Complete installation guide and a Quick installation and upgradeguide. Each document should be reviewed for a thorough understanding of the installation process.

    SE R V E R RE Q U I R E M E N T SNew with OracleAS 10g is the ability to run the installer with a precheck option. Many of the installation requirements can bechecked with this option, but not all. Not included in the prechecks are verifying adequate disk space, server exists on anetwork, and CPU type. A Standalone installation, where the server is not on a network, is supported on Windows and Linuxplatforms. Note that as of February, 2004, the Windows release of OracleAS 10g is a beta release. Use the following syntaxwhich is documented in the installation guide to run the Oracle Universal Installer in precheck mode:

    prompt> mount_point/runInstaller executeSysPrereqs

    Actual resource requirements will vary depending on your deployment architecture, number of users, and applications whichthe users will be accessing. However, the minimum requirements, recommended for infrastructure are 1 GB of available

    RAM, and 2.5 GB free disk space. The complete installation of the middle tier will require 1GB of RAM and approximately 2GB of disk space.

    D O CU M E N T A T I O N C H E C KS

    If you are new to Oracle application server technology, it is recommended that you not only familiarize yourself with theinstallation documentation, but also you should review the Concepts Guide and Administrators Guide.

    INSTALLATI ON OPTI ONS

    Unless you are planning to only install OracleAS 10g J2EE and Webcache version and do not want to use single sign-oncapabilities, you will need to build an infrastructure first.

    SI L E N T I N S T A L L A T I O N

    You can elect to install OracleAS 10g software either in the default interactive mode or you can perform a silent installation.

    A silent installation is useful when you are performing similar installations on multiple servers or are performing thoseinstallations remotely and only have access to a command line prompt. There is no output generated to a console in silentinstallation.

    Before beginning a silent installation, you will need to create an oraInst.loc file as the root user. Additionally, you must createa response file, which will contain all of the responses you would normally provide during an interactive installation. There areresponse file templates for each installation option. They are available with the distribution software. Errors in the responsefile will cause a failed installation.

    Below is an example of running a silent infrastructure installation with a response file

  • 8/3/2019 2004_paper_oracle Application Server 10g Basic Administration

    4/14

    Application Server and Web Services

    Paper #13005

    Page 4

    runInstaller silent /u01/oracle/infrastructure_response.dat

    After the installation completes, you must run the root.sh script as the root user, which can be found in$ORACLE_HOME/ bin directory. Both silent and interactive installations create an installActions log file, which should bereviewed after installation. This file, installActions[install_timestamp].log, can be found in the oraInventory directory specifiedduring installation. For silent installations, you will also have a silentInstall[install_timestamp].log file which indicates if theinstallation was successful.

    SP E C I F Y I N G PORTS

    One new installation feature is the ability to identify which ports you want the multitude of components to use prior tobeginning your install. Using a file named staticports.ini, you can predefine on which ports components will run. An exampleof the entries from this file is below:

    # J2EE and Web Cache

    Oracle HTTP Server port = 7792

    Oracle HTTP Server Listen port = 7793

    Oracle HTTP Server SSL port = 4443

    Oracle HTTP Server Listen (SSL) port = 4444

    .

    .

    .

    # Infrastructure

    Oracle Internet Directory port = port_num

    Oracle Internet Directory (SSL) port = port_num

    Oracle Certificate Authority SSL Server Authentication port = port_num

    Oracle Certificate Authority SSL Mutual Authentication port = port_num

    Keep in mind that for any process running on a port lower than 1024 in a UNIX environment, you may need root permissionsto start it and therefore the installer, which runs as an oracle specific user, will not be able to start it.

    INFRASTRUCTURE INSTALLATION

    There are three options for infrastructure installation. If you are planning to build a large scale environment and want toinstall pieces of the infrastructure on multiple machines, you will want to consider installing the Oracle Identity Managementat a separate installation from the Metadata installation type. However, for most installations, you will select the single optionfor both Oracle Identity Management and Metadata. Be sure to only select those components within the infrastructure thatyou intend to use or evaluate. For example, if you are not planning to build an SSL-enabled environment, do not install theOracle AS Certificate Authority.

    New in this release is the ability to name your infrastructure database any valid Oracle database name. In the previous release,9iAS release 2, you were forced to use iasdb as your instance name. Because this is a widely known SID, it could make iteasier for potential hackers to break in to your database. Another possible reason you would want to change the name of theSID is to fit your cooperate standards.

  • 8/3/2019 2004_paper_oracle Application Server 10g Basic Administration

    5/14

    Application Server and Web Services

    Paper #13005

    Page 5

    M IDDLE-TI ER IN STALLATI ON

    There are three options when you select OracleAS 10g Application Server at the beginning of installation. These are:

    J2EE and WebCache

    Portal and Wireless

    Business Intelligence

    As previously indicated, J2EE and WebCache do not require an infrastructure. The installation options are layered. Thismeans that if you elect to install Business Intelligence and Forms, you also will install Portal and Wireless, and J2EE andWebCache. To install all products, you will select Business Intelligence. All products will be configured at the end of thesoftware installation through a series of configuration assistants. However many of the components require post installationconfiguration. Additionally, note that you can expand your installation at a later date. If you initially performed only a Portaland Wireless installation, you can then expand your install to include the Business Intellegence software by installing into thesame $ORACLE_HOME directory.

    COMPONENT CONFIGURATION

    After a successful installation, you will need to perform post configuration steps for the following components. The postconfiguration steps are documented in the component-specific documentation.

    OracleAS Portal OracleAS Wireless

    Oracle Ultrasearch

    OracleAS Discoverer

    OracleAS Reports Services

    OracleAS Personalization

    OracleAS Certificate Authority

    POST-INSTALLATION NOTES

    Following installation, you should review the install.log file to ensure that all products installed without errors. Additionally,you should access a few key URLs from a workstation on your LAN. Ensuring that the workstation can ping the server

    would be your first step. Below is a list of standard URLs and their purpose.If you have not modified the installation port list, your default HTTP server port will be 7777 for infrastructure and 7778 forthe middle tier.

    Access the infrastructure OracleAS 10g Welcome Page at http:/ / server.domain.com:7777.

    Access the middle tier OracleAS 10g Welcome Page at http:/ / server.domain.com:7778

    Connect to OEM Application Server Control for the infrastructure at http:/ / server.domain.com:1810

    Connect to OEM Application Server Control for the middle tier at http:/ / server.domain.com:1810

    Both the infrastructure and middle tier each have an HTTP server, running on their own ports.

    The Welcome Page provides a quick method to accessing product demonstrations, release notes, and logging into OEMApplication Server Control. You can verify functionality of the application server components you installed by accessing thedemonstrations page. Note the installation level of the application server you selected. For example, if performed a Portaland Wireless installation type and not the Business Intelligence, your Oracle Forms, Oracle Reports and Discovererdemonstrations will not work.

    When your installation has finished, a summary screen will display a list of URLs. This same information is available to you inthe file: $ORACLE_HOME/ Apache/ Apache/ setupinfo.txt

    http://server.domain.com:7777/http://server.domain.com:7777/http://server.domain.com:7778/http://server.domain.com:7778/http://server.domain.com:1810/http://server.domain.com:1810/http://server.domain.com:1810/http://server.domain.com:1810/http://server.domain.com:7777/http://server.domain.com:7778/http://server.domain.com:1810/http://server.domain.com:1810/
  • 8/3/2019 2004_paper_oracle Application Server 10g Basic Administration

    6/14

    Application Server and Web Services

    Paper #13005

    Page 6

    MANAGING ORACLEAS10G

    NOTABLE USER ACCOUNTS

    Post installation there are multiple user accounts with which you should become acquainted. Unless you change the accountspassword, each account will have the same administration password you provided during the installation.

    orcladmin is the primary administration account. It is a valid user in both OID and Oracle Portal. portal is the primary administration account in Oracle Portal. With the user portal you can create Oracle Portal users.

    ias_admin is the default user name for OEM Application Server Control.

    Additionally, there are over twenty application schemas which are built during an Enterprise Edition installation. You mayneed to access the applications directly in the metadata repository. If , for example, you need to apply component-specif icpatches you may need to provide a schema password. Some of the application repositories are listed below.

    DISCOVERER5 is the end user layer for the Oracle Discoverer tool. You may need to connect from the DiscovererAdministrator tool to this schema.

    ORASSO is used for single sign-on metadata.

    ODS is the Oracle Internet Directory repository.

    PORTAL is the Oracle Portal repository. All application components, page data and content is owned by this schema. OEM_REPOSITORY supports OEM Application Server Control.

    DCM is the Distributed Configuration Management repository.

    You can use the Oracle DirectoryManager tool to find the databasepasswords for application seedschemas. This tool can be launchedfrom OracleAS 10g client software onyour workstation or runing oidadminfrom the infrastructure bin directory.

    Navigate as follows in OracleDirectory Manager.

    1 Entry Management cn=Products cn=IAS cn=IAS Infrastructure Database orclReferenceName=SID

    2 For each OrclResourceName, thedatabase schema password can befound in theorclpasswordattribute field in theproperties window.

    ORACLE INTERNET DIRECTORY SELF SERVICE CONSOLE

    Both application users and administrators can utilize the OID self service console. It provides a simple interface for passwordmanagement, creating users, looking up other users in your directory, and view user id preferences. It is available from theinfrastructure host at http:/ / host.domain.com:port/ oiddas

    Figure 2 - Oracle Directory Manager Portal Schema Password

  • 8/3/2019 2004_paper_oracle Application Server 10g Basic Administration

    7/14

    Application Server and Web Services

    Paper #13005

    Page 7

    OEM APPLICATION SERVER CONTROL

    In OracleAS 10g, OEM Application Server Control is configured automatically during installation of the infrastructure andmiddle tier. You will, post installation, have two running Application Server Control environments. If you have performed asingle server installation for the entire OracleAS 10g software suite, you can make post-installation changes to only use oneApplication Server Control.

    Application Server Control is a secure, web interface for managing your OracleAS 10g environment. It leverages the OPMNservices of OracleAS 10g. Most administration tasks can be completed effectively through the web interface. Real-timeperformance metrics are presented in a graphic format for easy determination of problems. After installation, access theenterprise manager website at http:/ / host.domain.com:1810. The main page of Application Server Control lists the instanceswhich make up your OracleAS 10g environment. Collective dependent instances are grouped together as farms. An instancein OracleAS 10g is a collection of processes and typically map to a single $ORACLE_HOME installation location. Throughthe robust Application Server Control, you can perform most typical administration tasks. To manage an instance in theapplication server, you will click the corresponding Instance Name from the main Application Server Control screen.

    For each Instance, there are four top-level pages: Home, J2EE Applications, Ports and Infrastructure.

    H OM E From the Instance Home page, you can

    View General information regarding the instance,including host, installation type, and$ORACLE_HOME of the software. Additionally,the host is a link, which will bring you to hostmanagement and monitoring pages. From the hostpage you can view host resource usage by process,file system usage, set thresholds for notification,view paging and view top processes.

    Start all, stop all, or restart all components in theInstance or individual components

    View a snapshot of CPU and memory utilization ofthe instance and components

    Access component-specific configuration andmanagement interfaces. The componentconfiguration and management interfaces will varydepending on the type of component. Forexample, within the HTTP Server component area,you can configure Virtual Hosts and modify HTTPserver properties. Additionally, you have a quicklink to the corresponding log files for thatcomponent.

    Disable and enable components. Disabledcomponents will not start when you issue a Start

    All command.

    J2E E A PPL I C A T I O N S

    In the J2EE Applications page, you will have a list of all OC4J applications registered to that instance. You can click theapplication name to jump to the OC4J application management page. From this page you can

    Redeploy or undeploy your application

    Perform administration tasks

    Figure 3 Instance Home Page of Appl ication Server Control

  • 8/3/2019 2004_paper_oracle Application Server 10g Basic Administration

    8/14

    Application Server and Web Services

    Paper #13005

    Page 8

    View performance metrics

    PORTS

    The ports page will present the actual ports each of the corresponding processes is using. It also allows a simple interface forchanging these ports and suggests a port range for these ports. Once you click the edit icon, you are brought to the

    component configuration pages where you can modify ports or perform other maintenance.I N F R A S T RU C T U R E The infrastructure management pages allow you to perform administration tasks including:

    Change the Oracle Internet Directory for this instance

    Change schema passwords in the metadata repository

    Configure OracleAS 10g to leverage a separately installed Oracle Enterprise Management Server

    ORACLE PROCESSMANAGER AND NOTIFICATION SERVER

    Oracle Process Management and Notification Server (OPMN) is made up of three components: a notification server, aprocess manager for OracleAS 10g, and a component specif ic process manager module. It is the primary command-line

    interface for managing and configuring OracleAS 10g.A key configuration file for OPMN is the opmn.xml file located in the $ORACLE_HOME/ opmn/ conf/ directory. For eachinstance of OracleAS 10g, you will have an opmn.xml file

    OPMN L OG F I L E S

    For each tier of an OracleAS 10g installation, you will need to manage OPMN log files. All log files are located in$ORACLE_HOME/ opmn/ logs. The ons.log file records notification server events. The ipm.log file contains processmanager logging. These files can grow quite large and should be routinely cleaned up. The level of logging is controlled by anentry in the opmn.xml file.

  • 8/3/2019 2004_paper_oracle Application Server 10g Basic Administration

    9/14

    Application Server and Web Services

    Paper #13005

    Page 9

    LOGLOADER

    The LogLoader is new with OracleAS 10g. You can configure it to load the many log files that are written by OracleAS 10g to

    a log repository and view the log files through your Application Server Control interface. On most of the pages in theApplication Server Control tool there is a log link. Click this link to access the LogLoader. Items available in LogLoader

    include:

    Search capabilities of loaded logs by component andcontent

    LogLoader parameter configuration includes loadinterval, location, and storage settings

    The log file search features provide a simple interface forOracleAS 10g administrations to keep up to date with thehealth of the application server environment. For example,you can perform a simple search for all log files for yourinfrastructure. This can return a large number of log files.You may then want to filter those log files and only viewproblems that are occurring. With the LogLoaderAdvanced Search functionality, you can filter your resultsetby time range, Message Type and Message Text.

    You can also query against the LogLoader Repository,which contains log files already loaded through theLogLoader process. You can add many additionalattributes to your search, such as host and userid.

    OR A C L E D I A G N O ST I C L O G G I N G ( O D L )

    ODL is Oracles new logging diagnostic util ity. Many of the components of OracleAS 10g can write log files in ODL format.This format uses XML. When configuring ODL, there are components that can write in either text or ODL format. Youmay configure logging options at the component level. ODL is used by LogLoader.

    L OG F I L E M A N A G E M E N T

    Log files will need to be managed and purged on a routine basis. Typically this would be a task accomplished through ascheduled job. Below is a list of many of the log files you will need to cleanup to avoid unnecessary use of file system space:

    BC4J Logs: $ORACLE_HOME/ BC4J/ logs/ OC4J_Name

    DCM Logs: $ORACLE_HOME/ dcm/ logs

    Discoverer Plus logs: $ORACLE_HOME/ discoverer/ logs

    Discoverer Viewer logs: $ORACLE_HOME/ j2ee/ OC4J_BI_FORMS

    Enterprise Manager logs: $ORACLE_HOME/ sysman/ log

    Forms: $ORACLE_HOME/ j2ee/ OC4J_BI_FORMS/ application-deployments/ forms90app/ island/ application.log

    HTTP_Server: $ORACLE_HOME/ Apache/ Apache/ logs/ error_log.timestamp and access_log.timestamp. Note thatnew in OracleAS 10g is the automatic rotation of log files for the HTTP_Server. By default, logs are switched every 12hours.

    Log Loader: $ORACLE_HOME/ diagnostics/ logs

    Figure 4 - View OC4J Application Specific Log Files

  • 8/3/2019 2004_paper_oracle Application Server 10g Basic Administration

    10/14

    Application Server and Web Services

    Paper #13005

    Page 10

    For each OC4J instance: $ORACLE_HOME/ j2ee/ instance_name/ log

    For each OC4J application: $ORACLE_HOME/ j2ee/ instance_name/ application-deployments/ application_name/ application.log

    Oracle Internet Directory: $ORACLE_HOME/ ldap/ log

    Oracle Reports: $ORACLE_HOME/ reports/ logs Web Cache: $ORACLE_HOME/ webcache/ logs

    Wireless: $ORACLE_HOME/ wireless/ logs

    DISTRIBUTED CONFIGURATION MANAGEMENT (DCM)

    DCM is a framework for managing multiple OracleAS 10g instances. Included in this framework at a set of processes, acommand line utility (dcmctl) and a repository. DCM provides configuration management for clusterable components ofOracleAS 10G, including the HTTP Server, OC4J Applications and OPMN. DCM does not manage components whichcannot be clustered, such as Oracle Portal, Wireless, Forms, Reports, and Discoverer.

    Through DCM, you can perform tasks listed below.

    Create an archive of your OracleAS 10g DCM manageable components. Deploy new OC4J applications to a clustered OracleAS 10g environment.

    STARTING ORACLEAS10GThe two primary methods of starting OracleAS 10g are via OEM Application Server Control and command line usingOPMN. For environments where both a middle tier and infrastructure are running, it is imperative that components arestarted in a proper order.

    START INFRASTRUCTURE1. Set the environment to the ORACLE_HOME of the infrastructure and the ORACLE_SID to the infrastructure database.

    2. Startup the database listener.

    $ lsnrctl start

    3. Startup the metadata database.$ sqlplus "/ as sysdba"

    SQL> startup

    4. Startup the Identity Management Components in infrastructure:$ORACLE_HOME/opmn/bin/opmnctl startall

    5. Start the OEM Application Server Control in the infrastructure:$ORACLE_HOME/bin/emctl start iasconsole

    6. You will next start all components in the infrastructure. Run Oracle Enterprise Manager through your web browser.Click the infrastructure instance. Click Start All

    START TH E MIDDLE TIER7. Set your environment to the $ORACLE_HOME of your middle tier.

    8. Startup the all OPMN managed processes in the middle tier:$ORACLE_HOME/opmn/bin/opmnctl startall

  • 8/3/2019 2004_paper_oracle Application Server 10g Basic Administration

    11/14

    Application Server and Web Services

    Paper #13005

    Page 11

    9. Start the OEM Application Server Control in the infrastructure:$ORACLE_HOME/bin/emctl start iasconsole

    The components started by opmnctl can instead be started by OEM Application Server Control. Simply eliminate runningopmnctl startall and start the Application Server Control. Launch the Application Server Control f rom your web browser.Click your infrastructure instance and start all component.

    Notes: Always start all of your infrastructure processes before starting your middle tier. Always stop all of your middle tiercomponents before stopping your infrastructure.

    MONITORING ORACLEAS10G ACTIVITYThere are two great tools available for download from the Oracle Technology Network web site[http:/ / otn.oracle.com/ products/ ias/ ias_utilities.html], Topology Viewer and iHAT. Both tools allow near real-time viewingof OracleAS 10g processes for both middle tiers and infrastructure.

    TOPOLOGY VIEWER

    Topology Viewer is an add-on preview only utility which is installed into the OEM Application Server Control tool. Once

    downloaded and installed, it provides a graphical, hierarchical web view of the entire OracleAS 10g environment. You canlaunch the Topology Viewer from the following URL: http:/ / host.domain.com:port/emd/ console/ ias/ topology/ topologyjsp

    Features of Topology Viewer include:

    JSP or Applet viewer launched from your browser

    Authentication to OEM Application Server Control isrequired

    Automatic refresh at 30 second or 1 minute intervals.Manual refresh is an option.

    Multiple zoom levels

    Component up or down indicators

    Expand/ collapse capabilities to rollup to the Farm or downto details of each process

    ID and resource utilization including memory and CPU foreach component process

    Easy navigation

    Search capabilities which will highlight components whichmatch search criteria

    IH AT

    OracleAS Hi-Av Tool (iHAT) provides areal time view of your OracleAS 10gsystem from a small java application runfrom a workstation. The tool requires javaruntime version 1.4. You will need toidentify on which port your OPMNrequest processes are listening by viewingthe opmn.xml file in $ORACLE_HOME/ opmn/ conf directory. Launching the tool is simple. Use the following command.C:\ihat>"C:\Program Files\Java\j2re1.4.0\bin\java" -jar ihat.jar host:port

    Figure 5 - JSP Topology Viewer

    Figure 6 - iH AT Grid View

  • 8/3/2019 2004_paper_oracle Application Server 10g Basic Administration

    12/14

    Application Server and Web Services

    Paper #13005

    Page 12

    There are two views in iHAT. The grid view will present a hierarchical viewof each instance in your OracleAS 10g farm. If a component is down, thecorresponding block will be gray, where the components which are up willbe green. Clicking any component will launch the iHAT instance view. The

    iHAT instance view contains detailed process information for eachcomponent process. This is a great tool for data center consoles which maybe watched by an operations staff.

    The types of information available in the instance view include:

    Process Set Status, for example Alive

    Type, for example OC4J, DCMDaemon, Webcache

    Memory Used in KB

    Up time in seconds

    CPU Time in percentage

    APPLICATION DEPLOYMENT EXAMPLESAll applications should be deployed to the middle tier of your OracleAS 10g environment. The infrastructure OC4J engineand HTTP Server is reserved for supporting the Application Server.

    DEPLOY AN HTMLWEB SITE

    OracleAS 10g contains the HTTP Server, a powerful web server, which serves web pages to internet or intranet web browsers.In order to better understand URL constructs and simple HTML applications, we can deploy an HTML application to ourOracleAS 10g environment.

    Figure 7 - iH AT I nstance View

  • 8/3/2019 2004_paper_oracle Application Server 10g Basic Administration

    13/14

    Application Server and Web Services

    Paper #13005

    Page 13

    1 Through the HTTP Server Component configuration in Application Server Control, identify the Document Root of theHTTP Server. You can click on your middle tier instance, HTTP Server, Administration, then Server Properties.

    2 Create a subdirectory on the server beneath Document Root directory for example called MyNewApp.

    3 Copy all html and image files, such as .jpg or .gif, to the new directory.4 Verify that the application is accessible through your web browser. For example:http:/ / www.your_domain.com/ MyNewApp/ start.html

    DEPLOY A SIMPLE PL/ SQLAPPLICATION

    A web application can be built with PL/ SQL packages and procedures utilizing the PL/ SQL web toolkit. The web toolkit isbuilt into later releases of the Oracle database by default. In order to run a web pl/ sql application, the middle tier must haveclient/ server connectivity to the database where the pl/ sql packages exist. Additionally, you want to verify that the web toolkialso exists. In this example, we will use the following simple stored procedure in our Oracle database. If this procedurecompiles successfully, you have verified that the toolkit is installed in your database.

    connect scott/tiger

    create or replace procedure hello_oracle is

    beginhtp.print ('Hello oracle');

    end;

    /

    1 Using Application Server Control, access the middle tier instance.

    2 Click HTTP Server

    3 Click Administration, then PL/ SQL Properties

    4 Click Create in the DAD Status area of the web page. We need to define the database access descriptor in the middletier.

    5 For traditional pl/ sql web applications, Create a DAD of type General.

    6 You must enter the DAD name. This will be part of the URL. For example, MyDemo

    7 Enter the username, password, and connect string to your target database and pl/ sql procedure.

    8 Select Basic authentication mode

    9 Restart the HTTP Server process.

    10 Test your application from your browser. In our example, the URL would be:http:/ / servername:port/ MyDemo/ hello_oracle

    DEPLOY A SIMPLE JAVA APPLICATION

    Developers can use a multitude of development tools to build java applications, such as Oracles Jdeveloper. J2EEapplications may be packaged as Web ARchive (WAR) files or Enterprise ARchive (EAR) files. EAR files can contain WARfiles.

    Application Server Control provides an easy GUI interface to WAR and EAR file deployment.

    1 In the middle tier instance management area, select Create OC4J Instance.

    2 You will first name the OC4J instance such as OC4J_App then click Create. This will create an additional componentin your middle tier component list.

    3 Click the new OC4J instance to actually deploy the WAR file. Click the Applications tab. This will bring you to aDeploy Web Application screen. You can use the Browse button to f ind the WAR file on your local PC. You will needto name the application and provide a virtual path to your application.

    4 Next, you will need to start the new OC4J instance from the component list in Application Server Control.

    5 Run your new application from a web browser.

    http://www.your_domain.com/MyNewApp/start.htmlhttp://www.your_domain.com/MyNewApp/start.htmlhttp://www.your_domain.com/MyNewApp/start.html
  • 8/3/2019 2004_paper_oracle Application Server 10g Basic Administration

    14/14

    Application Server and Web Services

    Paper #13005

    Page 14

    TROUBLESHOOTING

    USERS REPORTING " I CAN 'T CONNECT"Typical problems reported by users of application would include: I Cant Connect.

    Below is a list of questions to analyze during the troubleshooting process.

    Can you connect from a browser at your workstation? If so, the user could be misconfigured, using the wrong URL, orexperiencing LAN issues.

    Can you run the application from a browser on the server? If so, this could indicate that there are networking issues affectingyour users.

    Can you connect from your browser to the middle tier HTTP server? http:/ / hostname:port/ If so, there may be anapplication related issue such that a component is not running or misconfigured.

    Is your infrastructure fully functional? Try logging into single sign-on at http:/ / infrahost.domain.com:port/ pls/ orasso

    Does sql*net connectivity exist between the middle tier and infrastructure? Test with tnsping from the middle tier.

    Is Oracle Internet Directory running? Try connecting on infrastructure to OID DAS:http:/ / infrahost.domain.com:port/ oiddasand login as a registered user.

    Can you connect to the infrastructure database? Attempt a client/ server connection to the database verifying the listener islistening for incoming requests. Connect to the database using sql*plus.

    ABOUT TH E AUTHORTracie A. Owen is the Director of database administration services for MFG Systems Corporation; a New Jersey basedconsulting firm specializing in Oracle solutions. Ms. Owen has over 10 years of database administration experience. Her areasof expertise include web application architecture, data warehousing, high availability solutions, and project lead. Tracie haslately been focused on Oracles Application Server and Collaboration Suite. You can contact Tracie Owen at:

    MFG Systems Corp

    100 Davidson AveSomerset, NJ 08873

    Phone: (732) 560-0010 x213

    Fax: (732) 805-1989

    Email: [email protected]

    Company Website: www.mfgsys.com