Skip to content
Home » Oracle » Where is ORACLE_HOME Location

Where is ORACLE_HOME Location

What is ORACLE_HOME

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

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

  1. How to Find ORACLE_HOME Path in Windows
  2. How to Find ORACLE_HOME Path in Linux or Unix-like

ORACLE_HOME Path 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

ORACLE_HOME Path in Linux or Unix-like OS

To check ORACLE_HOME in Linux or Unix-like OS (e.g. AIX, Solaris), 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.

RAC Database

Since oratab file may 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. Required fields are marked *