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:
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.
In registry editor, you can go for the path:
It's shown as below.
In this case, the ORACLE_HOME is at:
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
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
In the second field, it's ORACLE_HOME.
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
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.