Question: I wish to display my ORACLE_SID
variable. How do I find the value of ORACLE_SID?
Answer: There are several commands, some internal
and some external to Oracle that will find your current
ORACLE_SID. Within Oracle (SQL*Plus) you can display
your ORACLE_SID with any of these commands:
select distinct sid from v$mystat;
select
* from global_name;
select instance from v$thread;
There are also external commands that show the current
settings for the ORACLE_SID variable:
AIX
$ ps -ef | grep pmon
ora1024
262314 1
0 Mar 23 -
0:12 ora_pmon_mysid
ORACLE_SID is mysid
Linux & Solaris
$ pgrep -lf
_pmon_
12586 ora_pmon_ee10204
ORACLE_SID is
ee10204
HP/UX
$ ps -ef | grep pmon
ora1024 25611
1 0 Mar 21 ?
0:24 ora_pmon_itanic10
ORACLE_SID is itanic10