Oracle Database - Oracle Home Directory (ORACLE_HOME|OH)

> Database > Oracle Database

1 - About

The Oracle home directory (ORACLE_HOME) is the directory where you choose to install the software for a particular Oracle product. You must install different Oracle products or different releases of the same Oracle product in separate Oracle home directories. When you run Oracle Universal Installer, it prompts you to specify the path to this directory as well as a name that identifies it. The directory that you specify must be a subdirectory of the Oracle base directory. Oracle recommends that you specify a path similar to the following for the Oracle home directory:

oracle_base/product/11.2.0/dbhome_1

Oracle Universal Installer creates the directory path that you specify under the Oracle base directory. It also sets the correct permissions on it. You do not need to create this directory.

During installation, you must not specify an existing directory that has predefined permissions applied to it as the Oracle home directory. If you do, then you may experience installation failure due to file and group ownership permission errors.

Advertising

3 - Question mark

In Oracle Database files and programs, a question mark (?) represents the value of the ORACLE_HOME environment variable. For example, Oracle Database expands the question mark in the following SQL statement to the full path of the Oracle home directory:

SQL> ALTER TABLESPACE TEMP ADD DATAFILE '?/dbs/temp02.dbf' SIZE 200M

4 - How to identify an existing Oracle home directory

4.1 - On Windows

To check the path of the Oracle home directory:

  • From the Start menu, choose Programs, then Oracle - HOME_NAME, then Oracle Installation Products, then Universal Installer.
  • When the Welcome window appears, click Installed Products.
  • The Inventory window appears, listing all of the Oracle homes on the system and the products installed in each Oracle home.

4.2 - On Linux

Enter the following command to display the contents of the oratab file:

# more /etc/oratab

Entries are of the form:

$ORACLE_SID:$ORACLE_HOME:<N|Y>

where: ORACLE_SID

If the oratab file exists, then it contains lines similar to the following:

*:/u03/app/oracle/product/11.2.0/dbhome_1:N
*:/opt/orauser/infra_904:N
*:/oracle/9.2.0:N

The directory paths specified on each line identify Oracle home directories. Directory paths that end with the user name of the Oracle software owner that you want to use are valid choices for an Oracle base directory. If you intend to use the oracle user to install the software, then you can choose one of the following directories listed in the previous example:

/u03/app/oracle
/oracle

If possible, choose a directory path similar to the first one (/u03/app/oracle). This path complies with the OFA guidelines.

Advertising

4.2.1 - Confirmation

From the orainventory dir:

cat /u01/app/oraInventory/ContentsXML/inventory.xml
db/oracle/oracle_home.txt · Last modified: 2017/09/06 19:29 by gerardnico