Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
CHAPTER 27
The Intelligent Infrastructure
Exam Objectives
In this chapter you will learn to
• 052.18.1 Use the Enterprise Manager Support Workbench
• 052.18.2 Manage Patches
• 053.13.1 Set Up the Automatic Diagnostic Repository
• 053.13.2 Use Support Workbench
ORACLE_BASE/diag/rdbms/database_name/instance_name
3
where database_name is the name of the database and instance_name is the name of
the instance. For example:
/u01/app/oracle/diag/rdbms/orcl11g/orcl11g
Within the ADR_HOME there will be a directory structure for the various files that
make up the ADR for the instance. Some of the files are formatted with XML tags and
are not intended to be viewed directly with editors; some are binary data; others are
plain text. The directory ADR_HOME/trace is used as the default value for the
instance parameters USER_DUMP_DEST (trace files generated by user sessions) and
BACKGROUND_DUMP_DEST (the alert log and trace files generated by background
processes). There is another copy of the alert log, formatted with XML tags, in ADR_
HOME/alert.
PART III
Problems and Incidents
A problem is a critical error in the database or the instance. Examples include internal
Oracle errors (errors reported with the error code ORA-600) and operating system
errors. Each problem has a problem key, which is a text string including the error code
and any parameters.
An incident is an occurrence of a problem. Incidents are considered to have the
same root cause if their problem keys match. When an incident occurs, it is reported
in the alert log and Enterprise Manager gathers diagnostic data about the incident in
the form of dump files (incident dumps) and stores these in an ADR subdirectory
created for that incident.
An incident package is a collection of data regarding one or more incidents and
problems, formatted for upload to Oracle Support Services as part of an SR.
The SET HOME command points the ADRCI toward one ADR_HOME, the path
being relative to the ADR_BASE. The SHOW PROBLEM command will list all known
problems for that ADR_HOME, identified by PROBLEM_ID number. The IPS CREATE
PACKAGE command will generate an incident package for the nominated problem in
the directory ADR_HOME/incpkg.
In most cases, the ADRCI will not be needed: Database Control has an interface to
the ADR that is usually easier to use.
TIP SRs used to be called TARs (Technical Assistant Requests), and you will
still hear many DBAs using phrases such as “raising a tar.”
To create an SR regarding a problem, select problem’s check box and click View to
reach the Problem Details window, shown in Figure 27-3.
PART III
Figure 27-2 The Support Workbench
EXAM TIP The Support Workbench is a tool for interfacing with MetaLink
and for packaging diagnostic information.
Exercise 27-1: Use the Support Workbench In this exercise, you will
investigate any problems that may have been recorded in the ADR.
4. Investigate any problems shown by clicking the links to show the details of
the problem.
7
Patches
In some environments, patching can take up a considerable amount of time. It is,
however, a vital task. Some patches will be to fix problems in the Oracle code that
cause some features not to work as documented: applying these is optional, only
necessary if your installation happens to have hit the problem. Others are to fix security
issues and are not optional at all. Patches can be applied using a command-line utility,
or with Enterprise Manager.
Types of Patch
Patches are shipped in three forms:
• Interim patches These are written to fix one specific problem, for an exact
PART III
release level of the database. They are not necessarily fully integration or
regression tested.
• CPU (Critical Patch Update) patches These are cumulative patches for
a specific release level and include all dependent patches. CPUs are fully
integration and regression tested.
• Patch sets A patch set is a cumulative set of product fixes that will increment
the release level of the product (as reported by a query against V$VERSION),
for instance, from 11.1.0.6 to 11.1.0.7.
If you have hit a problem, and research with MetaLink and with other resources
identifies the problem as a known bug with a patch to fix it, this patch can be installed
as an interim patch. Otherwise, do not install interim patches. CPUs are usually issued
every three months and will often include patches for security problems. These should
be installed, particularly if your systems have to comply with security standards
enforced by local jurisdictions. Applying a patch set is a much bigger operation that
may change the behavior of the product, rather than merely fixing problems.
Applying patch sets should not be embarked upon without full testing.
To apply patches, use the Opatch utility. This can be invoked from the command
line, or through Database Control.
TIP Many DBAs try to avoid installing interim patches. They will fix a problem,
but applying several may be problematic because of the lack of integration
testing. CPUs and patch sets are much safer.
Applying Patches
Patches can be applied with the Opatch utility, or with Database Control; the Database
Control method in fact uses Opatch behind the scenes. The Opatch utility is installed
into the directory ORACLE_HOME/Opatch and launched by running the executable
file opatch (or opatch.bat on Windows). The prerequisites are that the ORACLE_
HOME environment variable must be set (note that on Windows it is not sufficient to
have this as a registry variable; it must be set within the operating system session); the
Java Runtime Environment 1.4 or later must be available; a few standard operating
system utilities must be available. To test the prerequisites, use the LSINVENTORY
command as in Figure 27-4.
In Figure 27-4, Opatch is being run on a Windows system. The utility was invoked
by specifying the full path, using the ORACLE_HOME environment variable, and the
LSINVENTORY command. This shows summary information regarding what has been
installed, including any interim patches (none, in the example). To obtain much more
detailed information, use the -detail switch:
All patches will come with a README.TXT file of instructions detailing how to install
the patch. These instructions will include detail on whether the database should be open
or shut down while the patch is applied. To apply a patch once it is downloaded from
MetaLink and expanded (it will have come as a ZIP file), run Opatch as follows:
PART III
Figure 27-4 Using Opatch to inspect the inventoried software
To apply a patch with Database Control, the patch must first be downloaded to
a staging area. The staging area is a location where the patch is staged—stored locally,
prior to application. To reach the wizard that will stage and apply the patch, from the
database home page take the Software And Support tab, and then the Stage Patch link
in the Database Software Patching section. This will launch a six-step wizard:
• Select patch
• Select destination
• Set credentials
• Stage or apply
• Schedule
• Summary
The wizard will connect to MetaLink using stored credentials, download the patch,
and create a job to apply the patch. The illustrations that follow show examples of
using the wizard to apply a patch.
2. Choose the targets to which the patch should be applied. The choice will be
limited to targets appropriate for the patch (in the example, database instances).
11
3. Provide credentials. These will be either operating system credentials, database
credentials, or both depending on the patch.
PART III
4. Decide whether to apply the patch or only stage it for future use.
13
EXAM TIP Patches are applied with the Opatch utility—even when working
with Database Control, you are still using Opatch.
Exercise 27-2: Download and Apply a Patch In this exercise, you will
download a patch and apply it. Oracle Corporation provides a dummy patch for
this purpose. At the time of writing, this is only available for 32-bit Linux. If you are
working on another operating system, don’t worry—you will get practice in patching
soon enough when you start working on a live database.
1. Log in to MetaLink.
2. Take the Patches & Updates tab, and then the Simple Search link.
3. When prompted for a Patch Number/Name, enter 6198642. When prompted
PART III
for a Platform Or Language, select Linux x86 from the drop-down box. Click GO.
4. Click the DOWNLOAD button, shown in the next illustration, to download the
patch from MetaLink to an appropriate directory.
5. From an operating system prompt, unzip the patch. It will unzip into a
directory named 6198642.
6. Shut down the database and the listener: Opatch will not proceed if these are
running.
where patch_directory is the directory into which the patch was unzipped. The
next illustration shows this step, and the start of the output.
Two-Minute Drill
Use the Enterprise Manager Support Workbench
• Database Control can connect to MetaLink and identify lists of advised patches.
• The Support Workbench can classify errors into named problems, each
consisting of one or more incidents.
• Diagnostic information is stored in files in the ADR, located by default in the
ORACLE_BASE directory.
• All diagnostic information in the ADR relevant to a problem can be packaged
for transmission to Oracle Support Services.
Managing Patches
• Interim patches fix one problem.
• CPUs are bundled patches, often including security fixes.
15
• Patch sets raise the release level of the product.
• The Opatch utility installs patches and updates the inventory.
PART III
Self Test
1. If the system is behind a firewall proxy server, where must the proxy server be
defined before the REFRESHFROMMETALINK job can run? (Choose the best
answer.)
A. In the browser
B. In Database Control
C. In both the browser and Database Control
D. It is necessary to configure the firewall to allow a direct connection from
the. database server to the Internet
2. Where is the Automatic Diagnostic Repository? (Choose the best answer.)
A. In the location specified by the ADR_BASE environment variable.
B. In the flash recovery area.
C. In the location specified by the DIAGNOSTIC_DEST instance parameter.
D. In the location specified by the oraInst.loc file on Unix systems, or the
INST_LOC registry variable on Windows systems.
3. If your database release level is at 11.1.0.6, application of what type of patch
will raise this level? (Choose the best answer.)
A. An interim patch
B. A critical patch update
C. A patch set
D. Any patch installation will raise the reported level
4. What tool(s) can you use to install patches? (Choose all correct answers.)
A. Database Control
B. The Opatch utility
C. The Oracle Universal Installer
D. The Automatic Diagnostic Repository Command-Line Interface tool
(the ADRCI)
17
2. þ C. The DIAGNOSTIC_DEST parameter specifies the directory used as the
root of the ADR.
ý A, B, and D. A is wrong because ADR_BASE is not an environment variable.
B is wrong because the flash recovery area stores backup and recovery data,
not problem diagnosis data. D is wrong because it confuses the ADR with the
OUI Inventory.
PART III
ý C and D. C is wrong because the OUI doesn’t install patches—it installs
or upgrades an Oracle Home, which is a much larger operation. D is wrong
because the ADRCI uses the ADR to investigate problems; it doesn’t install
patches to fix them.
6. þ D. The ADR root directory (also known as the ADR base) is set by the
parameter DIAGNOSTIC_DEST. If it is not set, Oracle sets DIAGNOSTIC_
DEST to the environment variable ORACLE_BASE. If ORACLE_BASE is not
set, then the ADR root directory is set to $ORACLE_HOME/log.
ý A, B, and C. All three locations are not assigned, given the values of
DIAGNOSTIC_DEST, ORACLE_BASE, and ORACLE_HOME.
8. þ B, C, D, and E. You can use the Support Workbench for viewing problems
and incidents, manually running health checks, generating additional dumps
and test cases for Oracle support, creating and tracking a service request to
Oracle support, collecting all data related to a problem and packaging it, and
closing the problem when it has been resolved.
ý A. The EM support workbench cannot run recommended repairs.
However, you can initiate advisors that recommend repairs.