Skip to content

Where is ORACLE_HOME Location

  • by

What is ORACLE_HOME

ORACLE_HOME is the location of Oracle database home directory, which contains many important file relationship we may use them very often. To find the directory, we need more information.

In this post, I'll talk about how to find ORACLE_HOME in the following OS:

  1. Where is ORACLE_HOME in Windows
  2. Where is ORACLE_HOME in Linux or Unix-like

Where is ORACLE_HOME in Windows OS

Every Oracle environment variable is set in Registry Editor (i.e. regedit). To open the registry editor, please press ⊞ Win + R to opens the "Run Program Or File" Window, type regedit, then Enter.

Run Block - regedit

Run Block - regedit

In registry editor, you can go for the path:

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_ORACLE_HOME_NAME

It's shown as below.

regedit - ORACLE_HOME

regedit - ORACLE_HOME

In this case, the ORACLE_HOME is at:

C:\app\client\product\19.0.0\client_1

Where is ORACLE_HOME in Linux or Unix-like OS

To check ORACLE_HOME in Linux or Unix-like OS, the simplest way is to echo the environment variable $ORACLE_HOME for sure.

[oracle@test ~]$ echo $ORACLE_HOME
/u01/app/oracle/product/19.3.0/dbhome_1

If there's no such environment variable in your system, you can print oratab file if you know where it is.

[oracle@test ~]$ cat /etc/oratab
...
ORA19C1:/u01/app/oracle/product/19.3.0/dbhome_1:Y

In the second field, it's ORACLE_HOME.

ORACLE_HOME in RAC Databases

Since oratab file may not contain no information about ORACLE_HOME in a RAC database, you should use the server control utility (SRVCTL) to check.

[oracle@primary01 ~]$ srvctl config database -d orclcdb
Database unique name: ORCLCDB
Database name: ORCLCDB
Oracle home: /u01/app/oracle/product/19.0.0/db_1
Oracle user: oracle
Spfile: +DATA/ORCLCDB/spfile
Password file: +DATA/ORCLCDB/pwfile
...

In the above, command srvctl config database -d <db_unique_name> shows pretty much information including ORACLE_HOME for us.

Leave a Reply

Your email address will not be published.