Link to home
Start Free TrialLog in
Avatar of nobleit
nobleit

asked on

to find oracle home

SQL> set autopri on
SQL> var oracle_home varchar2(255)
SQL> exec dbms_system.get_env('ORACLE_HOME',:ORACLE_HOME)
BEGIN dbms_system.get_env('ORACLE_HOME',:ORACLE_HOME); END;

      *
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'DBMS_SYSTEM.GET_ENV' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored



ORACLE_HOME                                                                    
--------------------------------------------------------------------------------
             

I could not fine home..
Avatar of OP_Zaharin
OP_Zaharin
Flag of Malaysia image

- run this statement using user SYS as SYSDBA

- OR check the environment variables in My Computer properties. you should see the Oracle_Home entry in the system section.
- if you run this as other user, you need to grant execute on sys.dbms_system to that user
You will likely _not_ find ORACLE_HOME as a System environment variable on Windows. It comes from the registry on Windows. DBMS_SYSTEM.GET_ENV() will return it correctly on Windows or UNIX, but how it gets there differs.
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

I would also like to point out that a machine can have multiple ORACLE_HOME's set.

What exactly are you wanting to do with this once you get it?
ASKER CERTIFIED SOLUTION
Avatar of Thankxx
Thankxx
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial