Monday, October 10, 2011

How to see ORACLE_HOME OR ORACLE_BASE OR ORACLE_SID from command prompt?


On windows
=============

1)

C:\>echo %ORACLE_HOME%
%ORACLE_HOME%

C:\>
C:\>SET ORACLE_HOME=G:\oracle\product\10.2.0\db_1

C:\>
C:\>echo %ORACLE_HOME%

G:\oracle\product\10.2.0\db_1

C:\>
C:\>
C:\>
C:\>
C:\>SET ORACLE_SID=+ASMHALIM

C:\>echo %ORACLE_SID%
+ASMHALIM

C:\>
C:\>
C:\>echo %ORACLE_HOME%
G:\oracle\product\10.2.0\db_1

C:\>
C:\>
C:\>SQLPLUS /NOLOG

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Oct 10 16:15:19 2011

Copyright (c) 1982, 2005, Oracle. All rights reserved.

SQL>


2)

RUN----->CMD----->regedit------>

HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEID
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\ALL_HOMES



ON LINUX/UNIX
================


1) $env | grep ORACLE_HOME
$env | grep ORACLE_BASE
#env | grep ORACLE_SID


2) $ echo $ORACLE_HOME

for setting ORACLE_HOME

$ export ORACLE_HOME=

2 comments:

Anonymous said...

Hi, guys!
In the following post, there is a PL/SQL script that generates the current database environment file.
Also, it contains a good example of an environment file you'd better use for your database.

http://dbpilot.net/2018/01/30/generating-an-enviroment-file-from-pl-sql/

...

Anonymous said...

Hi, guys!
In the following post, there is a PL/SQL script that generates the current database environment file.
Also, it contains a good example of an environment file you'd better use for your database.

http://dbpilot.net/2018/01/30/generating-an-enviroment-file-from-pl-sql/

...