15
Application Server and Web Services Paper #13005 Page 1 Reviewed by Oracle Certified Master Korea Community ( http://www.ocmkorea.com http://cafe.daum.net/oraclemanager ) ORACLE APPLICATION SERVER 10G: BASIC ADMINISTRATION INTRODUCTION Following Oracle Corporation's focus on web technologies, companies are opting to web-enable their existing applications as part of the traditional upgrade process. Other companies are purchasing vendor-supplied web applications built with Oracle products. 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 other operational support personnel. Frequently, the person responsible for support has little or no web server support experience. This paper will provide an introduction to the architecture of OracleAS 10g, the tools available for administration and basic troubleshooting. Additionally, the paper will cover deployment of simple java, Oracle PL/SQL and HTML applications. ORACLEAS 10G 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. The user can be anywhere in the world, mobile or LAN, internet or intranet. a middle tier, which is typically a web server or application server. This middle tier software serves applications from a central location to the clients, interfacing from the client to a backend data store. It can contain a load balancing router, clustering software, and one or more application servers. a third tier, which is the database, which houses the application data. The platform of each tier, including hardware and operating system, is independent of the other tiers. Because of the data protection requirements, the data store is often 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 it needs to read from or write to the database, will connect to the database through another firewall. The area that contains the Figure 1 - Traditional Internet Application Architecture

ORACLE APPLICATION SERVER 10G BASIC ADMINISTRATION · Oracle Certificate Authority SSL Mutual Authentication port = port_num Keep in mind that for any process running on a port lower

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ORACLE APPLICATION SERVER 10G BASIC ADMINISTRATION · Oracle Certificate Authority SSL Mutual Authentication port = port_num Keep in mind that for any process running on a port lower

Application Server and Web Services

Paper #13005 Page 1

Reviewed by Oracle Certified Master Korea Community

( http://www.ocmkorea.com http://cafe.daum.net/oraclemanager )

OORRAACCLLEE AAPPPPLLIICCAATTIIOONN SSEERRVVEERR 1100GG:: BBAASSIICC AADDMMIINNIISSTTRRAATTIIOONN

INTRODUCTION Following Oracle Corporation's focus on web technologies, companies are opting to web-enable their existing applications as part of the traditional upgrade process. Other companies are purchasing vendor-supplied web applications built with Oracle products. 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 other operational support personnel. Frequently, the person responsible for support has little or no web server support experience. This paper will provide an introduction to the architecture of OracleAS 10g, the tools available for administration and basic troubleshooting. Additionally, the paper will cover deployment of simple java, Oracle PL/SQL and HTML applications.

ORACLEAS 10G 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. The user can be anywhere in the world, mobile or LAN, internet or intranet.

• a middle tier, which is typically a web server or application server. This middle tier software serves applications from a central location to the clients, interfacing from the client to a backend data store. It can contain a load balancing router, clustering software, and one or more application servers.

• a third tier, which is the database, which houses the application data. The platform of each tier, including hardware and operating system, is independent of the other tiers. Because of the data protection requirements, the data store is often 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 it needs to read from or write to the database, will connect to the database through another firewall. The area that contains the

Figure 1 - Traditional Internet Application Architecture

Page 2: ORACLE APPLICATION SERVER 10G BASIC ADMINISTRATION · Oracle Certificate Authority SSL Mutual Authentication port = port_num Keep in mind that for any process running on a port lower

Application Server and Web Services

Paper #13005 Page 2

application servers is called a demilitarized zone (DMZ). The DMZ sits between the corporate intranet and the internet, and therefore can restrict incoming requests to the corporate LAN for added security.

Page 3: ORACLE APPLICATION SERVER 10G BASIC ADMINISTRATION · Oracle Certificate Authority SSL Mutual Authentication port = port_num Keep in mind that for any process running on a port lower

Application Server and Web Services

Paper #13005 Page 3

ORACLEAS 10G ARCHITECTURE

OracleAS 10g Enterprise Edition includes Oracle Portal and Wireless, J2EE, and business intelligence application development/ 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 a management 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 single infrastructure.

INFRASTRUCTURE COMPONENTS

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

• Oracle Identity Management, which consolidates management of your application users. Oracle Identity Management leverages 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 for authentication and authorization to multiple applications. A key component to Oracle Identity Management is Oracle’s LDAP3 compliant Oracle Internet Directory (OID) server. OID can be configured for SSL and can run on ports compliant within the corporation’s business requirements. OID can also be configured to replicate between other LDAP3 compliant directory servers to provide simplified enterprise-wide corporate directory services.

MIDDLE TIER COMPONENTS The middle tier of OracleAS 10g is where your user community will connect and run applications. OracleAS 10g offers a high performance J2EE compliant server for java application deployment. Additional installations options, and of course increased license 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, new OracleAS 10g middle tier installations can leverage an existing infrastructure. The current release of OracleAS 10g even allows middle tier installations to be wired to a 9iAS release 2 infrastructure.

INSTALLATION

THE INSTALLATION 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 be responsible for architecting the target server environment, installing and configuring the OracleAS 10g software, developing backup and recovery strategies, performing administration and troubleshooting.

• Network Specialist: Responsibilities include configuring the servers on the corporate network, firewall if applicable, and routers if applicable. This person will provide support for any connectivity issues which may arise in the OracleAS 10g environment.

Page 4: ORACLE APPLICATION SERVER 10G BASIC ADMINISTRATION · Oracle Certificate Authority SSL Mutual Authentication port = port_num Keep in mind that for any process running on a port lower

Application Server and Web Services

Paper #13005 Page 4

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

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 system patch requirements or resource requirements can be costly. Not only will you have wasted time during the installation but you will waste additional time cleaning up your server for the reinstallation. For each installation, files are written to an Oracle Inventory directory, your target software installation directory. Additional files, depending on your environment, will be written to /var/opt/oracle and /usr/local/bin. For example, in the current (OracleAS 10g) Release Notes, there are notes regarding 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 includes operating system patch requirements, hardware requirements, database compatibility, and a wealth of information you will need to be aware of before beginning installation. For OracleAS 10g, there are two installation guides – the ‘Complete’ installation guide and a Quick installation and upgrade guide. Each document should be reviewed for a thorough understanding of the installation process.

SERVER REQUIREMENTS New with OracleAS 10g is the ability to run the installer with a precheck option. Many of the installation requirements can be checked with this option, but not all. Not included in the prechecks are verifying adequate disk space, server exists on a network, and CPU type. A Standalone installation, where the server is not on a network, is supported on Windows and Linux platforms. Note that as of February, 2004, the Windows release of OracleAS 10g is a beta release. Use the following syntax which 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 which the 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 2 GB of disk space.

DOCUMENTATION CHECKS If you are new to Oracle application server technology, it is recommended that you not only familiarize yourself with the installation documentation, but also you should review the Concepts Guide and Administrator’s Guide.

INSTALLATION OPTIONS

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

SILENT INSTALLATION 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 those installations remotely and only have access to a command line prompt. There is no output generated to a console in silent installation.

Page 5: ORACLE APPLICATION SERVER 10G BASIC ADMINISTRATION · Oracle Certificate Authority SSL Mutual Authentication port = port_num Keep in mind that for any process running on a port lower

Application Server and Web Services

Paper #13005 Page 5

Before beginning a silent installation, you will need to create an oraInst.loc file as the ‘root’ user. Additionally, you must create a response file, which will contain all of the responses you would normally provide during an interactive installation. There are response file templates for each installation option. They are available with the distribution software. Errors in the response file will cause a failed installation. Below is an example of running a silent infrastructure installation with a response file 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 be reviewed after installation. This file, installActions[install_timestamp].log, can be found in the oraInventory directory specified during installation. For silent installations, you will also have a silentInstall[install_timestamp].log file which indicates if the installation was successful.

SPECIFYING PORTS One new installation feature is the ability to identify which ports you want the multitude of components to use prior to beginning your install. Using a file named staticports.ini, you can predefine on which ports components will run. An example of 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 permissions to 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 to install pieces of the infrastructure on multiple machines, you will want to consider installing the Oracle Identity Management at a separate installation from the Metadata installation type. However, for most installations, you will select the single option for both Oracle Identity Management and Metadata. Be sure to only select those components within the infrastructure that you intend to use or evaluate. For example, if you are not planning to build an SSL-enabled environment, do not install the Oracle 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 it easier for potential hackers to break in to your database. Another possible reason you would want to change the name of the SID is to fit your cooperate standards.

Page 6: ORACLE APPLICATION SERVER 10G BASIC ADMINISTRATION · Oracle Certificate Authority SSL Mutual Authentication port = port_num Keep in mind that for any process running on a port lower

Application Server and Web Services

Paper #13005 Page 6

MIDDLE-TIER INSTALLATION

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. This means that if you elect to install Business Intelligence and Forms, you also will install Portal and Wireless, and J2EE and WebCache. To install all products, you will select Business Intelligence. All products will be configured at the end of the software installation through a series of configuration assistants. However many of the components require post installation configuration. Additionally, note that you can expand your installation at a later date. If you initially performed only a Portal and Wireless installation, you can then expand your install to include the Business Intellegence software by installing into the same $ORACLE_HOME directory.

COMPONENT CONFIGURATION

After a successful installation, you will need to perform post configuration steps for the following components. The post configuration 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 for the 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 OEM Application Server Control. You can verify functionality of the application server components you installed by accessing the demonstrations page. Note the installation level of the application server you selected. For example, if performed a ‘Portal and Wireless’ installation type and not the ‘Business Intelligence’, your Oracle Forms, Oracle Reports and Discoverer demonstrations will not work. When your installation has finished, a summary screen will display a list of URLs. This same information is available to you in the file: $ORACLE_HOME/Apache/Apache/setupinfo.txt

Page 7: ORACLE APPLICATION SERVER 10G BASIC ADMINISTRATION · Oracle Certificate Authority SSL Mutual Authentication port = port_num Keep in mind that for any process running on a port lower

Application Server and Web Services

Paper #13005 Page 7

MANAGING ORACLEAS 10G

NOTABLE USER ACCOUNTS Post installation there are multiple user accounts with which you should become acquainted. Unless you change the account’s password, 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 may need to access the applications directly in the metadata repository. If, for example, you need to apply component-specific patches 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 Discoverer Administrator 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 Directory Manager tool to find the database passwords for application seed schemas. This tool can be launched from OracleAS 10g client software on your workstation or runing ‘oidadmin from the infrastructure bin directory. Navigate as follows in Oracle Directory Manager. 1 Entry Management →

cn=Products → cn=IAS → cn=IAS Infrastructure Database → orclReferenceName=SID

2 For each OrclResourceName, the database schema password can be found in the orclpasswordattribute field in the properties 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 password management, creating users, looking up other users in your directory, and view user id preferences. It is available from the infrastructure host at http://host.domain.com:port/oiddas

Figure 2 - Oracle Directory Manager Portal Schema Password

Page 8: ORACLE APPLICATION SERVER 10G BASIC ADMINISTRATION · Oracle Certificate Authority SSL Mutual Authentication port = port_num Keep in mind that for any process running on a port lower

Application Server and Web Services

Paper #13005 Page 8

OEM APPLICATION SERVER CONTROL

In OracleAS 10g, OEM Application Server Control is configured automatically during installation of the infrastructure and middle tier. You will, post installation, have two running Application Server Control environments. If you have performed a single server installation for the entire OracleAS 10g software suite, you can make post-installation changes to only use one Application Server Control. Application Server Control is a secure, web interface for managing your OracleAS 10g environment. It leverages the OPMN services of OracleAS 10g. Most administration tasks can be completed effectively through the web interface. Real-time performance metrics are presented in a graphic format for easy determination of problems. After installation, access the enterprise manager website at http://host.domain.com:1810. The main page of Application Server Control lists the instances which make up your OracleAS 10g environment. Collective dependent instances are grouped together as farms. An instance in OracleAS 10g is a collection of processes and typically map to a single $ORACLE_HOME installation location. Through the robust Application Server Control, you can perform most typical administration tasks. To manage an instance in the application 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.

HOME 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 host management and monitoring pages. From the host page 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 the Instance or individual components

• View a snapshot of CPU and memory utilization of the instance and components

• Access component-specific configuration and management interfaces. The component configuration and management interfaces will vary depending on the type of component. For example, within the HTTP Server component area, you can configure Virtual Hosts and modify HTTP server properties. Additionally, you have a quick link to the corresponding log files for that component.

• Disable and enable components. Disabled

components will not start when you issue a ‘Start All’ command.

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

Figure 3 – Instance Home Page of Application Server Control

Page 9: ORACLE APPLICATION SERVER 10G BASIC ADMINISTRATION · Oracle Certificate Authority SSL Mutual Authentication port = port_num Keep in mind that for any process running on a port lower

Application Server and Web Services

Paper #13005 Page 9

• Redeploy or undeploy your application • Perform administration tasks • 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 for changing 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.

INFRASTRUCTURE 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 PROCESS MANAGER AND NOTIFICATION SERVER

Oracle Process Management and Notification Server (OPMN) is made up of three components: a notification server, a process manager for OracleAS 10g, and a component specific 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 each instance of OracleAS 10g, you will have an opmn.xml file

OPMN LOG FILES 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 process manager logging. These files can grow quite large and should be routinely cleaned up. The level of logging is controlled by an entry in the opmn.xml file.

Page 10: ORACLE APPLICATION SERVER 10G BASIC ADMINISTRATION · Oracle Certificate Authority SSL Mutual Authentication port = port_num Keep in mind that for any process running on a port lower

Application Server and Web Services

Paper #13005 Page 10

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 the Application 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 and content

• LogLoader parameter configuration includes load interval, location, and storage settings

The log file search features provide a simple interface for OracleAS 10g administrations to keep up to date with the health of the application server environment. For example, you can perform a simple search for all log files for your infrastructure. This can return a large number of log files. You may then want to filter those log files and only view problems that are occurring. With the LogLoader Advanced Search functionality, you can filter your resultset by time range, Message Type and Message Text. You can also query against the LogLoader Repository, which contains log files already loaded through the LogLoader process. You can add many additional attributes to your search, such as ‘host’ and ‘userid’.

ORACLE DIAGNOSTIC LOGGING (ODL) ODL is Oracle’s new logging diagnostic utility. 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. You may configure logging options at the component level. ODL is used by LogLoader.

LOG FILE MANAGEMENT Log files will need to be managed and purged on a routine basis. Typically this would be a task accomplished through a scheduled 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

Figure 4 - View OC4J Application Specific Log Files

Page 11: ORACLE APPLICATION SERVER 10G BASIC ADMINISTRATION · Oracle Certificate Authority SSL Mutual Authentication port = port_num Keep in mind that for any process running on a port lower

Application Server and Web Services

Paper #13005 Page 11

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

• Log Loader: $ORACLE_HOME/diagnostics/logs • 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, a command line utility (dcmctl) and a repository. DCM provides configuration management for clusterable components of OracleAS 10G, including the HTTP Server, OC4J Applications and OPMN. DCM does not manage components which cannot 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 ORACLEAS 10G The two primary methods of starting OracleAS 10g are via OEM Application Server Control and command line using OPMN. For environments where both a middle tier and infrastructure are running, it is imperative that components are started in a proper order.

START INFRASTRUCTURE

1. 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’

Page 12: ORACLE APPLICATION SERVER 10G BASIC ADMINISTRATION · Oracle Certificate Authority SSL Mutual Authentication port = port_num Keep in mind that for any process running on a port lower

Application Server and Web Services

Paper #13005 Page 12

START THE MIDDLE TIER

7. 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 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 running ‘opmnctl startall’ and start the Application Server Control. Launch the Application Server Control from 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 tier components before stopping your infrastructure.

MONITORING ORACLEAS 10G ACTIVITY There 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 viewing of 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 can launch 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 is

required • 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 down

to details of each process • ID and resource utilization including memory and CPU for

each component process • Easy navigation • Search capabilities which will highlight components which

match search criteria

Figure 5 - JSP Topology Viewer

Page 13: ORACLE APPLICATION SERVER 10G BASIC ADMINISTRATION · Oracle Certificate Authority SSL Mutual Authentication port = port_num Keep in mind that for any process running on a port lower

Application Server and Web Services

Paper #13005 Page 13

IHAT OracleAS Hi-Av Tool (iHAT) provides a real time view of your OracleAS 10g system from a small java application run from a workstation. The tool requires java runtime version 1.4. You will need to identify on which port your OPMN request processes are listening by viewing the 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

There are two views in iHAT. The grid view will present a hierarchical view of each instance in your OracleAS 10g farm. If a component is down, the corresponding block will be gray, where the components which are ‘up’ will be green. Clicking any component will launch the iHAT instance view. The iHAT instance view contains detailed process information for each component process. This is a great tool for data center consoles which may be 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 EXAMPLES All applications should be deployed to the middle tier of your OracleAS 10g environment. The infrastructure OC4J engine and HTTP Server is reserved for supporting the Application Server.

DEPLOY AN HTML WEB 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 our OracleAS 10g environment.

Figure 6 - iHAT Grid View

Figure 7 - iHAT Instance View

Page 14: ORACLE APPLICATION SERVER 10G BASIC ADMINISTRATION · Oracle Certificate Authority SSL Mutual Authentication port = port_num Keep in mind that for any process running on a port lower

Application Server and Web Services

Paper #13005 Page 14

1 Through the HTTP Server Component configuration in Application Server Control, identify the ‘Document Root’ of the

HTTP 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/SQL APPLICATION A web application can be built with PL/SQL packages and procedures utilizing the PL/SQL web toolkit. The web toolkit is built into later releases of the Oracle database by default. In order to run a web pl/sql application, the middle tier must have client/server connectivity to the database where the pl/sql packages exist. Additionally, you want to verify that the web toolkit also exists. In this example, we will use the following simple stored procedure in our Oracle database. If this procedure compiles successfully, you have verified that the toolkit is installed in your database.

connect scott/tiger create or replace procedure hello_oracle is begin htp.print ('<h1>Hello oracle</h1>'); 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 middle

tier. 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 Oracle’s Jdeveloper. J2EE applications may be packaged as Web ARchive (WAR) files or Enterprise ARchive (EAR) files. EAR files can contain WAR files. 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 component in

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 a

‘Deploy Web Application’ screen. You can use the ‘Browse’ button to find the WAR file on your local PC. You will need

Page 15: ORACLE APPLICATION SERVER 10G BASIC ADMINISTRATION · Oracle Certificate Authority SSL Mutual Authentication port = port_num Keep in mind that for any process running on a port lower

Application Server and Web Services

Paper #13005 Page 15

to 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.

TROUBLESHOOTING

USERS REPORTING "I CAN'T CONNECT"

Typical problems reported by users of application would include: ‘I Can’t 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, or experiencing LAN issues. Can you run the application from a browser on the server? If so, this could indicate that there are networking issues affecting your users. Can you connect from your browser to the middle tier HTTP server? http://hostname:port/ If so, there may be an application 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/oiddas and login as a registered user. 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.