Linux
Show all environment settings
$ env
$ env | sort
Show current SID
$ env | grep SID
$ echo $ORACLE_SID
Set Oracle environment manually
$ ps -ef | grep [s]mon
$ oraenv
Set oracle SID
$ export oracle_sid=ORCL
Set pre-configured environment
$ . orcl.env
cat orcl.env
export ORACLE_SID=ORCL1
export ORACLE_HOME=/u01/app/oracle/product/11.2.0.3/dbhome_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$PATH
export NLS_LANG=AMERICAN_CIS.AL32UTF8
export NLS_DATE_FORMAT='dd.mm.rr'
export TNS_ADMIN=$ORACLE_HOME/network/admin
alias s='sqlplus "/ as sysdba"'
EDITOR=vi
export EDITOR
export diag=/u01/app/oracle/diag/rdbms/orcl/ORCL1/trace
HP-UX
Set environment
$ . /.orcl.env
Windows
Set environment
set oracle_sid
Show all Environment settings
set
Set Oracle SID
set ORACLE_SID=ORCL
Open sqlplus
sqlplus "/ as sysdba"
Static Oracle SID
Start / Run / regedit
HKEY_LOCAL_MACHINE / SOFTWARE / ORACLE / KEY_OraDb11g_home1 / ORACLE_SID /
Path to ORACLE_HOME
Start / Run / regedit
HKEY_LOCAL_MACHINE / SOFTWARE / ORACLE
Connect to the Oracle database using sqlplus: Go to ORACLE DBA / General / Connect to DB, sqlplus...