Customizing Oracle 10g Installation Options
In This Chapter
- OEM and Automatic Alerts
- XML DB for XML Data Processing
- ConText and Other Options
- Setting Up RAC
- Managing Backups with RMAN
OEM and Automatic Alerts
Oracle has greatly improved the Oracle Enterprise Manager (OEM), giving it more tools for you to manage all components of the software and hardware framework in the corporate environment. The OEM has extended its level of control to manage Oracle databases, Oracle Application Server, Oracle Collaboration Suite, Oracle Ebusiness Suite, different hosts or servers in the environment, and application groups.
With the updated Enterprise Manager, you can perform all the database-administration activities as well as monitor and administer the different targets and applications in the corporate ecosystem. This will afford you a higher level of flexibility and functionality to centrally manage all the applications on a Web-based Grid Control Console over the Internet or an intranet. Using the Software Development Kit from Oracle, you can also add new targets in your environment as you expand the infrastructure.
A typical Enterprise Manager framework consists of the following components:
- An Oracle Management Agent is added to each monitored host to monitor all targets on that host. It transmits the information to the middle-tier management service for management and maintenance. The managed targets can be anything from databases, application servers, or listeners to vendor applications or software.
- The Oracle Management Service is a J2EE Web-based application that provides a user interface for the Grid Control Console. It also works with the management agents to process job information, and stores related data in the Management Repository.
- An Oracle Management Repository consists of two tablespaces in the Oracle database with information about administrators, targets, and applications managed by the Enterprise Manager. This repository organizes the stored data for easy access by the Management Service and display on the Grid Control Console.
- Oracle Enterprise Manager 10g Grid Control uses various technologies to look up, monitor, and administer the environment.
- Oracle Enterprise Manager 10g Grid Control Console is another Web-based interface for managing the corporate computing environment from a single location, as if the environment were a single unit.
For more details on setting up and monitoring the grid environment, see Chapter 18, "Leveraging Grid Technology Features." In this chapter, we will go over the major steps involved in the setup and utilization of OEM for database-monitoring functions.
OEM Preinstallation Requirements
Let us review the preinstallation requirements for Oracle Enterprise Manager for use with an Oracle database. We will discuss the requirements for the basic components of a small as well as a large environment. For more details, refer to Oracle Enterprise Manager Grid Control Installation and Basic Configuration 10g.
The management repository needs 1GB of hard disk and 512MB of memory for small environments with fewer than 25 managed targets. For a large organization with around 500 targets, the recommended memory is 2GB and 24–48GB of hard disk space depending on your installation and database requirements. The repository is created within two tablespaces, MGMT_TABLESPACE and MGMT_ECM_DEPOT_TS, requiring around 120MB of disk space for the smallest default installation.
The management service needs a minimum of 500MB for a Windows installation and around 1.5GB for UNIX, with a minimum memory of 1GB and a processor speed of 1GHz for the host. The management agent needs a minimum of 400MB of initial disk space for Solaris (350MB for Windows) to do all logging and tracing activities, and around 25MB of operating memory per database or application server. You will need proportionately higher numbers for the service and agent for larger installations.
The management repository requires Oracle9i Database (or RAC) Enterprise Edition Release 2 (184.108.40.206 or higher), or Oracle Database 10g Database (or RAC) Release 1 (10.1.0.3 or higher). Regardless of whether you choose to create a new database or use an existing database for the repository, the intended repository database must have fine-grained access control turned on with satisfactory software, patch, and tuning requirements met as per the installation guide.
OEM Installation Process
Oracle Enterprise Manager is installed with a default super administrator account called SYSMAN. During the database installation process, you will install the OEM 10g database control. The Enterprise Manager directories and files are installed into each Oracle Database 10g home directory and database control commands are installed into ORACLE_HOME/bin directory. The database control has the necessary tools to help you manage the database. As for the management agent and management service support files, those files common to all database instances are stored in the ORACLE_HOME/sysman directory. Files unique to each database instance are stored under the ORACLE_HOME/hostname_sid directory. The presence of the hostname_sid directory indicates that the OEM database control was configured for that instance.
During the database-installation process, you will be prompted to provide a password for SYSMAN. This password is needed for the initial login to OEM. The SYSMAN account cannot be deleted or renamed. Oracle also recommends creating an administrator account using the SYSMAN account for each database administrator (DBA) using the system. This will help you to control access for every DBA working on the system in various roles and responsibilities.
The Enterprise Manager Configuration Assistant (EMCA) installation script (emca) for Oracle Enterprise Manager is located in the $ORACLE_HOME/bin directory in UNIX and Linux. When executed, the script will present a series of questions with regard to the host name, instance name, and so on, as given in Listing 3.1. Your screen may vary depending on the operating system being used. You should set the appropriate environment variables (ORACLE_HOME and ORACLE_SID) for the database to be managed before you run EMCA. The complete list of EMCA command-line arguments is given in the Oracle Enterprise Manager Grid Control Installation and Basic Configuration 10g guide. For Oracle Real Application Clusters (discussed later in this chapter), create the instances first and then configure the database control for each instance in the cluster using EMCA.
Listing 3.1 Running the EMCA Installation Script
STARTED EMCA at Fri Mar 18 08:24:06 CST 2005 Enter the following information about the database to be configured Listener port number: 1521 Database SID: Q0OR10G Service name: Q0OR10G Email address for notification: Email gateway for notification: Password for dbsnmp: Password for sysman: Password for sys: Password for sys: ----------------------------------------------------------------- You have specified the following settings Database ORACLE_HOME ............/opt/app/oracle/product/10.1.0/ Enterprise Manager ORACLE_HOME ........../opt/app/oracle/product/10.1.0/OEM Database host name ................QLAB10G.US.ACME.COM Listener port number ................ 1521 Database SID ................ Q0OR10G Service name ................ Q0OR10G Email address for notification ............... Email gateway for notification ............... ----------------------------------------------------------------- Do you wish to continue? [yes/no]: yes ........... ........... .......... ...........
When you do your OEM installation, you may see slightly different screens depending on your operating system. The dotted lines denote the execution of various scripts in the process.
The URL to access the Enterprise Manager from a Web browser for the preceding installation is http://QLAB10G.US.ACME.COM:5500/em.
You can now check the status of the OEM control using the command as shown in Listing 3.2.
Listing 3.2 Checking the Status of OEM Control
QLAB10G:/opt/app/oracle10g/product/10.1.0/bin> emctl status dbconsole Oracle Enterprise Manager 10g Database Control Release 10.1.0.2.0 Copyright (c) 1996, 2004 Oracle Corporation. All rights reserved. http://QLAB10G.US.ACME.COM:5500/em/console/aboutApplication Oracle Enterprise Manager 10g is running. ------------------------------------------------------------------ Logs are generated in directory /opt/app/oracle10g/product/10.1.0/QLAB10G.US.ACME.COM_Q0OR10G/sysman/log
If you are not sure of the various command options for emctl, type emctl at the command line and Oracle will provide all available options for the command. Listing 3.3 shows the result of this operation.
Listing 3.3 Command Options for emctl
QLAB10G:/opt/app/oracle10g/product/10.1.0/bin>emctl Oracle Enterprise Manager 10g Database Control Release 10.1.0.2.0 Copyright (c) 1996, 2004 Oracle Corporation. All rights reserved. Invalid arguments Unknown command option Usage:: Oracle Enterprise Manager 10g Database Control commands: emctl start| stop| status dbconsole emctl secure <options> emctl set ssl test|off|on em emctl set ldap <host> <port> <user dn> <user pwd> <context dn> emctl blackout options can be listed by typing "emctl blackout" emctl config options can be listed by typing "emctl config" emctl secure options can be listed by typing "emctl secure" emctl ilint options can be listed by typing "emctl ilint" emctl deploy options can be listed by typing "emctl deploy"
Once the installation is completed, use the appropriate URL to log in to OEM. For those who are using the Web browser version of OEM, type in the following address: http://localhost:port_number/em. The port number can be changed by modifying $ORACLE_HOME/install/portlist.ini. You can also use the OEM interface in Windows by choosing Start, Programs, Oracle Enterprise Manager Console Environment.
After you enter the user name and password, the Web interface will change into the instance summary display, which provides guidance through the rest of the instance administration tasks. The new look and feel of OEM provides a feature-rich display that allows a DBA to drill down to detailed reports on any metric.
Control for Oracle Management Agents
If you installed the Oracle management agent as part of Grid Control or Application Server, it would have its own home (AGENT_HOME), like ORACLE_HOME. We will discuss briefly the process of controlling the management agent using emctl located in the AGENT_HOME/bin directory. You can use the emctl command to start, stop, or check the status of an agent. The syntax for the appropriate command on UNIX systems is emctl <start/stop/status> agent. For Windows-based systems, the agent is listed under Services (likely found in Control Panel). When you find the appropriate service, you can start or stop it using the Services control panel. You can also switch to the AGENT_HOME/bin directory using the DOS prompt on Windows and run the emctl commands.
Automatic Alerts and Management
Before diving into alert management using OEM, let’s review some preliminary information on database metrics and alerts. Metrics are units of measurement to assess the health of your system with predefined thresholds for each unit. Oracle has thresholds for most of the metrics. When a metric reaches a threshold, an alert is generated. The alert also indicates that a particular condition has been encountered—for example, a threshold has been reached or an alert has been cleared. You can use OEM to set up alerts to send a notification to the DBA, start another job, and so on. The vast majority of the OEM metric-based alerts are polled by the management agent at intervals. As soon as the condition or conditions that triggered the alert are resolved and the metric’s value is within its predefined boundary, Oracle clears the alert.
You can review the metrics on the All Metrics page under Related Links on the OEM Database Home page. Refer to Figure 3.1 for details. An online help feature is available in OEM to give you a description of each metric. Alerts are displayed on the Database Home page under the Alerts section. Nondatabase alerts are displayed under Related Alerts.
Figure 3.1 OEM: Alerts.
Oracle has provided a set of predefined metrics, some with predefined thresholds. When your database needs metrics outside these predefined values, you have to set thresholds to different values. These thresholds can be edited using OEM from the Database Home > Related Links > Manage Metrics link. The Manage Metrics page, shown in Figure 3.2, displays existing thresholds for metrics with response actions, if any. Review these thresholds and identify the values that need editing.
Figure 3.2 OEM: Manage Metrics.
Using the Edit Thresholds link (see Figure 3.3), go to the editing screen, where you can enter new Warning Threshold and Critical Threshold values, or modify existing values. In the Response Actions field, you can add the name of a script or operating-system command to be executed when a threshold is crossed and an alert is issued. Click OK and save the changes made to the thresholds from this screen.
Figure 3.3 OEM: Manage Metrics > Edit Thresholds.
Setup, Response, and Clearing of Alerts
OEM can be used to send alert notifications to the DBA by pager or email. From the Database Control page, click the Setup link (visible in header or footer area) and choose Notification Methods from the Setup page. Complete the information needed for the Mail Server section on this page. See Figure 3.4 for details.
Figure 3.4 OEM: Alerts > Notification Methods
From the Database Control page, choose the Preferences link, click General, and enter your email address in the E-mail Address section. Select Notification Rules and modify any default notification rules and severity settings for receiving notifications. Click the Help link to get more details on setting up the rules.
When you receive an alert, follow the alert recommendations or run ADDM or another advisor to get a more detailed diagnostic of the system and object behavior. You can also run a corrective script upon receiving an alert as given in the Metric Thresholds Management page.
Oracle clears most of the alerts automatically after the cause of the alert disappears. Some alerts need to be acknowledged by the DBA, while others may require corrective measures. After you take necessary corrective actions, acknowledge the alert by clearing it or purging it. The cleared alert is sent to the Alert History, which is viewable from the OEM home page under Related Links; purged alerts are deleted from the Alert History.
From the Home page, click on the Alerts link and select the alert to be cleared from the Alerts page. Choose Clear or Purge to act on the alert. You can also choose the Clear Every Open Alert or Purge Every Alert option from this screen, but neither one is a good choice.
Mobile Management Using EM2Go
Oracle has introduced the EM2Go mobile application for use on personal digital assistants (PDAs) that support Microsoft Pocket PC Internet Explorer. This can be used to monitor the Oracle Enterprise Manager from a desktop as well as out of office over a wireless network. EM2Go is installed as a part of OEM.
EM2Go uses HTTPS communications and has the security model with administrator privileges and roles. You can connect your PDA desktop browser to the EM2Go URL and view targets assigned to you with proper privileges. No data is stored on the hand-held device; hence, a lost or stolen device poses no security risk.