0

I have server that has had Oracle installed by someone else. I am able to connect to it using SQL developer and do all the operations, but I want to know the location where Oracle is installed.

I need this details to execute exp, imp, expdp, impdp, etc. commands using putty to perform import/export and data dumps.

Is there any way I can get the Oracle installation directory details using SQL command? Does Oracle store the installation path in a database?

Tony Hinkle
8,0921 gold badge24 silver badges46 bronze badges
asked Mar 28, 2019 at 6:50

2 Answers 2

1

I am sure there is a even smarter way, but if you use the default trace file directories, which is usually the case, you will in most cases find both ORACLE_BASE and ORACLE_HOME via

SELECT VALUE FROM V$DIAG_INFO WHERE NAME = 'Diag Trace';

This gives you the absolute path to the trace files and they are inside ORACLE_BASE and ORACLE_HOME respectively.

HTH KR Peter

Edit: Have a look here for a more straight forward approach: https://dba.stackexchange.com/questions/97390/query-to-get-oracle-home-path-in-oracle-11g

answered Mar 28, 2019 at 10:01
-1

On the database server (VM), use the provided oraenv script to set up your working environment. This reads the entries in /etc/oratab and sets not only the PATH environment variable, but also the Library Include Paths as well.

$ source oraenv 
ORACLE_SID = [grid] ? MYSID
The Oracle base remains unchanged with value /u01/app/oracle_homes/product/dbhome_1

Of course, for this to work, you have to have the Oracle binaries in your PATH already, so that the shell can find oraenv! To set this up by default, copy part of the entry from /etc/oratab into your .bash_profile:

[/etc/oratab]
MYSID:/u01/app/oracle_homes/product/dbhome_1:N
[~/.bash_profile]
export PATH=${PATH}:/u01/app/oracle_homes/product/dbhome_1/bin
answered Mar 28, 2019 at 12:11
1
  • yes, the OP can do what he needs by using oraenv, but no he does not have to know where the binaries are to put them in the path. By default, the installation of oracle will put oraenv into /usr/local/bin, which is already in the PATH. Commented Mar 28, 2019 at 21:36

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.