Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

Find ORACLE_HOME

Oracle Database Tips by Donald BurlesonSeptember 8, 2015


Question:
 I wish to display my ORACLE_HOME variable.  How do I find the value of ORACLE_HOME?

 

Answer:  There are several commands, some internal and some external to Oracle that will find your current ORACLE_HOME.  Within Oracle SQL*Plus, the following SQL command script will display the value of your ORACLE_HOME:

SQL > var OH varchar2(200);

SQL > EXEC dbms_system.get_env('ORACLE_HOME', :OH) ;

SQL > PRINT OH

There are also external commands that show the current settings for the ORACLE_HOME variable.

On most UNIX distributions (AIX, Solaris Linux and HP/UX) you can use the env and echo commands to find the current setting for your ORACLE_HOME. where ORACLE_HOME is set-up as an environmental variable.

$ env|grep -i ORACLE_HOME

/u01/app/oracle/product/10gR2/db_1

$ echo ORACLE_HOME

/u01/app/oracle/product/10gR2/db_1

For other OS environments there ORACLE_HOME is not defined as a variable, you can find the ORACLE_HOME directory with these command sets:

AIX: Display ORACLE_HOME

$ ps -ef | grep pmon

ora1024   262366        1   0   Mar 23      -  0:12 ora_pmon_mysid
 
ORACLE_SID is mysid
 
$ ls -l /proc/262366/cwd

lr-x------   2 ora1024  dba  0 Mar 23 19:31 cwd -> /data/opt/app/product/10.2.0.4/db_1/dbs/
 
ORACLE_HOME is /data/opt/app/product/10.2.0.4/db_1

 



Linux & Solaris:Display ORACLE_HOME

$ pgrep  -lf _pmon_

12546 ora_pmon_mysid
 
ORACLE_SID is mysid
 
$ pwdx 12546

12586: /u01/oracle/10.2.0.4/ee1/dbs


HP/UX: Display ORACLE_HOME


$ ps -ef | grep pmon
 
ora1024 25441     1  0  Mar 21  ?         0:24 ora_pmon_itanic10
 
ORACLE_SID is itanic10
 
$ pfiles 25441 | grep  bin
 
25441:                  /opt/ora/app/db_1/bin/oracle
 
ORACLE_HOME is /opt/ora/app/db_1

This is an excerpt from the book "Oracle Shell Scripting" by Rampant TechPress. 

You can buy it directly from the publisher for only $34.95.  Also, see the Oracle script collection for over 600 working Oracle scripts to download.

 

   
Oracle Training from Don Burleson 

The best on site "Oracle training classes" are just a phone call away! You can get personalized Oracle training by Donald Burleson, right at your shop!

Oracle training
 
 


 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster