-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathvariables.conf
59 lines (43 loc) · 1.79 KB
/
variables.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
###########################
#
# Common Oracle Environment
#
###########################
#################################
#
# Common environment variables
#
export COE_BASE=~/COE
export COE_BIN=$COE_BASE
export COE_SQL=$COE_BASE
export COE_ETC=$COE_BASE
# defaulting to AL32UTF8. Final value will depend on the database after its environment is set
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"
# The default path is always the same. When an environment is set, the specific PATH is prepended to this one.
# This allows to have a clean PATH at every environment switch
export DEFAULT_PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:${COE_BASE}/bin:/opt/csw/bin
# Solaris / Lunix support
orainstloc=/dev/null
for oil in /etc/oraInst.loc /var/opt/oracle/oraInst.loc; do
[[ -f "${oil}" ]] && orainstloc="${oil}" && break
done
olrloc=/dev/null
for olr in /etc/oracle/olr.loc /var/opt/oracle/olr.loc; do
[[ -f "${olr}" ]] && olrloc="${olr}" && break
done
export CENTRAL_ORAINV=`grep ^inventory_loc ${orainstloc} 2>/dev/null | awk -F= '{print $2}'`
export RLWRAP=$(which rlwrap)
export EDITOR=$(which vi)
if [ -f /etc/oracle/olr.loc ] || [ -f /var/opt/oracle/olr.loc ]; then
# get the CRS HOME (using ORA_CLU_HOME as environment variable as ORA_CRS_HOME is reserved and might cause unexpected behaviour)
export ORA_CLU_HOME=`cat ${olrloc} 2>/dev/null | grep crs_home | awk -F= '{print $2}'`
export CRS_EXISTS=1
export CRSCTL=$ORA_CLU_HOME/bin/crsctl
export SRVCTL=$ORA_CLU_HOME/bin/crsctl
export OLSNODES=$ORA_CLU_HOME/bin/olsnodes
# we put the CRS bin in the PATH by default (at the end for lowest priority), so basic cluster commands are available all the time
export DEFAULT_PATH=$DEFAULT_PATH:$ORA_CLU_HOME/bin
else
export CRS_EXISTS=0
fi