Read Pro Oracle Database 11g Administration Online

Authors: Darl Kuhn

Tags: #Oracle DBA

Pro Oracle Database 11g Administration (10 page)

BOOK: Pro Oracle Database 11g Administration
11.75Mb size Format: txt, pdf, ePub
ads

If you encounter an error using a response file, 90 percent of the time it’s due to an issue with how you set the variables in the response file. Inspect those variables carefully, and ensure that they’re set correctly. Also, if you don’t fully specify the command-line path to the response file, you receive errors such as this:

OUI-10203: The specified response file 'enterprise.rsp' is not found.

Here is another common error when the path or name of the response file is incorrectly specified: OUI-10202:No response file is specified for this session.

11

CHAPTER 1 ■ INSTALLING THE ORACLE BINARIES

Listed next is the error message you receive if you enter a wrong path to your products.xml file within the response file’s FROM_LOCATION variable:

OUI-10133:Invalid staging area

Also, be sure you provide the correct command-line syntax when running a response file. If you incorrectly specify or misspell an option, you may receive a misleading error message such as DISPLAY

not set. When using a response file, you don’t need to have your DISPLAY variable set. This message is confusing because in this scenario, the error is caused by an incorrectly specified command-line option and has nothing to do with the DISPLAY variable. Check all options entered from the command line, and ensure that you haven’t misspelled an option.

Another common issue occurs when you specify an ORACLE_HOME and the silent installation thinks the given home already exists:

Check complete: Failed <<<<

Problem: Oracle Database 11g Release 2 can only be installed in a new Oracle Home Recommendation: Choose a new Oracle Home for installing this product.

Check your inventory.xml file (in the oraInventory/ContentsXML directory), and make sure there’s not a conflict with an already-existing Oracle home name.

When you’re troubleshooting issues with Oracle installations, remember that the installer uses two key files to keep track of what software has been installed and where: oraInst.loc and inventory.xml.

Table 1–1 describes the files used by the Oracle installer.

Table 1–1.
Useful Files for Troubleshooting Oracle Installation Issues
File name

Directory Location

Contents

oraInst.loc

The location of this file varies by

oraInventory directory

operating system. On Linux, this file is in

location and installation

/etc; on Solaris, it’s in /var/opt/oracle.

operating system group

inst.loc \\HKEY_LOCAL_MACHINE\\Software\Oracle

Inventory information

(Windows registry)

inventory.xml oraInventory/ContentsXML/inventory.xml

Oracle home names and

corresponding directory

location

.log files

oraInventory/logs

Installation log files, which

are extremely useful for

troubleshooting

Installing with a Copy of an Existing Installation

DBAs sometimes install Oracle software by using a utility such as tar to copy an existing installation of the Oracle binaries to a different server (or a different location on the same server). This approach is fast and simple (especially compared to downloading and running the Oracle installer). This technique allows DBAs to easily install the Oracle software on multiple servers and at the same time ensure that each installation is identical.

12

CHAPTER 1 ■ INSTALLING THE ORACLE BINARIES

Installing Oracle with an existing copy of the binaries is a two-part process: Copy the binaries using an operating system utility.

Attach the Oracle home.

These steps are detailed in the next two subsections.


Tip
MOS note 300062.1 contains instructions on how to clone an existing Oracle installation.

Step 1. Copy the Binaries Using an Operating System Utility

You can use any operating system copy utility to perform this step. The Linux/Unix tar, scp, and rsync utilities are commonly used by DBAs to copy files. This example shows how to use the Linux/Unix tar utility to replicate an existing set of Oracle binaries to a different server. First, locate the target Oracle home binaries that you want to copy:

$ echo $ORACLE_HOME

/oracle/app/oracle/product/11.2.0/db_1

In this example, the tar utility copies every file and subdirectory in or below the db_1 directory: $ cd $ORACLE_HOME

$ cd ..

$ tar -cvf orahome.tar db_1

Now, copy the orahome.tar file to the server where you want to install the Oracle software. In this example, the tar file is copied to the /oracle/app/oracle/product/11.2.0.1 directory on a different server. The tar file is extracted there and creates a db_1 directory as part of the extract: $ cd /oracle/app/oracle/product/11.2.0.1

Make sure you have plenty of disk space available to extract the files. A typical Oracle installation can consume at least 3–4GB of space. Use the Linux/Unix df command to verify that you have enough space:

$ df -h | sort

Next, extract the files:

$ tar -xvf orahome.tar

When the tar command completes, there should be a db_1 directory beneath the

/oracle/app/oracle/product/11.2.0.1 directory.


Tip
Use the tar -tvf command to preview which directories and files are restored without actually restoring them.

13

CHAPTER 1 ■ INSTALLING THE ORACLE BINARIES

$ cd $ORACLE_HOME/oui/bin

Now, attach the Oracle home by running the runInstaller utility as shown: $ ./runInstaller -silent -attachHome -invPtrLoc /etc/oraInst.loc \

ORACLE_HOME="/oracle/app/oracle/product/11.2.0.1/db_1" ORACLE_HOME_NAME="ONEW"

You should see a message like this if successful:

The inventory pointer is located at /etc/oraInst.loc

The inventory is located at /oracle/app/oracle/oraInventory

'AttachHome' was successful.

You can also examine the contents of your oraInventory/ContentsXML/inventory.xml file. Here’s a partial snippet of the line inserted into the inventory.xml file as a result of running the runInstaller utility with the attachHome option:


Upgrading Oracle Software

You can also upgrade a version of the Oracle software using the silent installation method. For example, let’s see how you upgrade from Oracle Database 10
g
10.2.0.1 to version 10.2.0.4.


Note
Upgrading the Oracle software isn’t the same as upgrading an Oracle database. This section only deals with using the silent install method for upgrading the Oracle software. Additional steps are involved with upgrading a database. Refer to MOS note 730365.1 for documentation on how to upgrade a database from one version to another.

First, download the upgrade version from the MOS web site, http://support.oracle.com (you need a valid support contract to do this). For this example, for Solaris, the file name is p6810189_10204_Solaris-64.zip. Copy the file to the database server on which you want to perform the Oracle upgrade. Place it in a directory such as /orahome/orainst/10.2.0.4. Now, unzip the file: $ unzip p6810189_10204_Solaris-64.zip

The unzip command should take only a few minutes to unbundle the file. After it’s finished, find the sample response file associated with this upgrade:

$ find . -name "*.rsp"

Here is the location of the response file for this example:

./Disk1/response/patchset.rsp

Change location to the Disk1 directory:

$ cd Disk1

15

CHAPTER 1 ■ INSTALLING THE ORACLE BINARIES

Next, copy the response file from the response directory to the current working directory: $ cp response/patchset.rsp inst.rsp

Open the response file with an operating system editor utility such as vi: $ vi inst.rsp

Modify the parameters to match your environment. Here are the most notable parameters to modify for this particular Oracle Database 10
g
10.2.0.4 upgrade: UNIX_GROUP_NAME=dba

FROM_LOCATION=/ora01/orainst/10.2.0.4/Disk1/stage/products.xml

ORACLE_HOME=/ora01/app/oracle/product/10.2.0.4/db_1

ORACLE_HOME_NAME=OHOME10

In the previous list, the ORACLE_HOME and ORACLE_HOME_NAME variables must match the values of the set of binaries you’re upgrading. If you’re upgrading an existing Oracle installation, ensure that no databases are running that are using the binaries you’re upgrading.

Now, run the runInstaller utility in silent mode as follows:

$ ./runInstaller -ignoreSysPrereqs -force -silent -responseFile \

/orahome/orainst/10.2.0.4/Disk1/inst.rsp

When you’re performing an upgrade, there are two basic scenarios. Here is scenario A: Shut down any databases using the Oracle home to be upgraded.

Upgrade the Oracle home binaries.

Start up the database, and run any required upgrade scripts.

Here are the steps for the scenario B approach to an upgrade:

Leave the existing Oracle home as it is—don’t upgrade it.

Install a new Oracle home that is the same version as the old Oracle home.

Upgrade the new Oracle home to the desired version.

When you’re ready, shut down the database using the old Oracle home, set the OS variables to point to the new upgraded Oracle home, start the database, and run any required upgrade scripts.

Which of the previous two scenarios is better? Scenario B has the advantage of leaving the old Oracle home as it is; therefore, if you need to switch back to the old Oracle home for any reason, you have those binaries available. Scenario B has the disadvantage of requiring extra disk space to contain two installations of Oracle home. This usually isn’t an issue, because after the upgrade is complete, you can delete the old Oracle home when it’s convenient.

Reinstalling After Failed Installation

You may run into the situation where you’re attempting to install Oracle and for some reason the installation fails. You correct the issue and attempt to re-run the Oracle installer. However, you receive this message:

Check complete: Failed <<<<

Problem: Oracle Database 10g Release 2 can only be installed in a new Oracle Home Recommendation: Choose a new Oracle Home for installing this product.

16

CHAPTER 1 ■ INSTALLING THE ORACLE BINARIES

In this situation, Oracle thinks the software has already been installed for a couple of reasons: Files in the ORACLE_HOME directory are specified in the response file.

An existing Oracle home and location in your

oraInventory/ContentsXML/inventory.xml file match what you have specified in the response file.

Oracle doesn’t allow you to install a new set of binaries over an existing Oracle home. If you’re sure you don’t need any of the files in the ORACLE_HOME directory, you can remove them (be very careful—

ensure that you absolutely want to do this). This example navigates to ORACLE_HOME and then removes the dev_1 directory and its contents:

$ cd $ORACLE_HOME

$ cd ..

$ rm -rf dev_1

Also, even if there are no files in the ORACLE_HOME directory, the installer inspects the inventory.xml file for previous Oracle home names and locations. In the inventory.xml file, you must remove the entry that corresponds to the Oracle home location that matches the Oracle home you’re trying to install to.

To remove the entry, first locate your oraInst.loc file, which contains the directory of your oraInventory. Navigate to the oraInventory/ContentsXML directory. Make a copy of inventory.xml before you modify it:

$ cp inventory.xml inventory.xml.old

Edit the inventory.xml file with an operating system utility (such as vi), and remove the line that contains the Oracle home information of your previously failed installation. You can now attempt to execute the runInstaller utility again.

Applying Interim Patches

Sometimes you’re required to apply a patch to resolve a database issue or eradicate a bug. You usually obtain patches from the MOS web site and install them with the opatch utility. Here are the basic steps for applying a patch:

Obtain the patch from MOS (requires a valid support contract).

Unzip the patch file.

Carefully read the README.txt file for special instructions.

Shut down any databases and processes using the Oracle home to which the patch is being applied.

Apply the patch.

Verify that the patch was installed successfully.

A brief example will help illustrate the process of applying a patch. In this example, patch number 7695070 is used to fix an issue with the time zone format in a 10.2.0.4 database on a Solaris box. First, download the p7695070_10204_Solaris-64.zip file from MOS (https://support.oracle.com). Next, unzip the file on the server where the patch is being applied:

$ unzip p7695070_10204_Solaris-64.zip

17

CHAPTER 1 ■ INSTALLING THE ORACLE BINARIES

The README.txt instructs you to change the directory as follows:

$ cd 7695070

Make sure you follow the instructions included in the README.txt, such as shutting down any databases that use the Oracle home to which the patch is being applied: $ sqlplus / as sysdba

BOOK: Pro Oracle Database 11g Administration
11.75Mb size Format: txt, pdf, ePub
ads

Other books

Love Me if You Dare by Carly Phillips
Vampire Breath by R. L. Stine
September Wind by Janz-Anderson, Kathleen
Knife Fight by Joel Goldman
Time for Love by Kaye, Emma
A Welcome Grave by Michael Koryta