There are two oracle directories on our system:

  • oracle
  • oraclex

How can I find out which of them is used by the running Oracle instance?

1 Answer 1


There are several way to find it out. Some of them:

1) The easiest is to find out with which user the database process are running, then watch if this user has some environment variables set:

$ ps aux | grep ora_pmon
orauser    2653  (...)  ora_pmon_DB

$ su - orauser -c "echo \$ORACLE_HOME"

2) You may also have an /etc/oratab. If the databases are started automatically on boot, this file may contain the $ORACLE_HOME.

3) You can pick one oracle process and find out its environment:

$ ps aux | grep ora_pmon
orauser    2653  (...)  ora_pmon_DB

$ strings /proc/2653/environ | grep ORACLE_HOME

Note that /proc/2653/environ has a specific delimiter (shown as ^@)

4) If you have an access to the database, using sqlplus, you can try this trick:

SQL> @?/foobar.foo

WATCHOUT!foobar.foo should not exist, so you will have an error message like /u21/oracle/product/foobar.sql doesn't exist

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .