Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: query $ORACLE_HOME

Re: query $ORACLE_HOME

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 17 Nov 2004 08:25:31 -0800
Message-ID: <2687bb95.0411170825.47b2d5ed@posting.google.com>


Sybrand Bakker <gooiditweg_at_sybrandb.verwijderdit.demon.nl> wrote in message news:<01gkp0dh5sl7dgrc1gt2dg9hnno46vjna1_at_4ax.com>...
> On 16 Nov 2004 08:01:35 -0800, johnleslie_at_madasafish.com (John Leslie)
> wrote:
>
> >Is there a table or view that contains the value for the current $ORACLE_HOME?
> >
> >JL
>
> no

Actually, depending on your version of Oracle there are ways to get this information from within Oracle but not by directly quering a pre-provided table or view. 10g provides an undocumented function call that will display this.

Here is a script for 10g with notes on how to do this in 9i, 8i, and 8.0:

set echo off

--
-- SQLPlus 10g script to find Oracle Home directory fr within pl/sql
or SQLPlus
--
--  20040928  Mark D Powell  Save Oaktable post Re: The REAL way to
find
--                           oracle_home jocke_at_treugut-tuning.com
20040928.
--
--  on 9i, 8i  select file_spec from DBA_LIBRARIES
--             where library_name = 'DBMS_SUMADV_LIB' and parse
--         8i  also could use external table on oratab file
--  on 8  use utl_file on oratab
--
spool orahome

variable var1 varchar2(100);
execute dbms_system.get_env('ORACLE_HOME',:val1)

PRINT val

spool off

HTH -- Mark D Powell --
Received on Wed Nov 17 2004 - 10:25:31 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US