You are on page 1of 2

set ORACLE_SID=abc

--sqlplus / as sysdba
---set TNS_ADMIN=abracadabra
Windows: set TNS_ADMIN=%ORACLE HOME%\network\admin
Unix/ Linux: export TNS_ADMIN=$ORACLE HOME/network/admin
C:\> set tns_admin=c:\temp
Start the listener by clicking Start. You must start the listener in this way
because you cannot use the Listener Control utility to start the listener running
as an unprivileged local user.
NET START OracleHOME_NAMETNSListenerextproc_listener_name

echo $ORACLE_HOME
echo $TNS_ADMIN

# -- Begin Oracle Settings --


umask 022
ORACLE_BASE=/opt/oracle
ORACLE_HOME=/opt/oracle/product/12.1.0
ORACLE_SID=PV; export ORACLE_SID
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib
TNS_ADMIN=$ORACLE_HOME/network/admin
PATH=$PATH:$ORACLE_HOME/bin:/usr/ccs/bin:/usr/delphi/bin
EXTPROC_DLLS=ONLY:${LD_LIBRARY_PATH}/libpvmextc.so
export PATH ORACLE_BASE ORACLE_HOME NLS_LANG
export ORA_NLS33 LD_LIBRARY_PATH TNS_ADMIN
export EXTPROC_DLLS
# -- End Oracle Settings --

ORACLE BASE
ORACLE_BASE is an environment variable used as base directory for an OFA
installation. On Unix systems, this is usually /app/oracle or /u01/app/oracle.
Windows:
set ORACLE_BASE=C:\oracle
Unix/ Linux:
export ORACLE_BASE=/app/oracle

To find the current DB_NAME and ORACLE_SID:


===========================================

Query the views v$database and v$thread.

V$DATABASE gives DB_NAME


V$THREAD gives ORACLE_SID

If ORACLE_SID = DB_SID and db_name = DBNAME:

To find the current value of ORACLE_SID:

SVRMGR> select instance from v$thread;


INSTANCE
----------------
DB_SID

To find the current value of DB_NAME:

SVRMGR> select name from v$database;

You might also like