-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathdbbatch.sh
57 lines (52 loc) · 3.12 KB
/
dbbatch.sh
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
# dbbatch.sh
# Copyright (C) 2004, 2013 Sean Scott [email protected]
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# This is a set of parameters for setting up Oracle batch jobs.
CLIENT=client.com; export CLIENT
MACHINE=`uname -n`; export MACHINE
[email protected]; export DEFAULT_MAIL
[email protected],[email protected]; export DBA_MAIL
[email protected]; export APP_EMAIL
ALL_MAIL=$DBA_MAIL","$APP_EMAIL export ALL_MAIL
ORACLE_BASE=/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ADR_BASE=$ORACLE_BASE; export ADR_BASE
NODE=mydb1; export NODE
EDITOR=vi; export EDITOR
ORACLE_TERM=vt100; export ORACLE_TERM
TERM=vt100; export TERM
DBA=/home/oracle/scripts; export DBA
LOGS=/home/oracle/logs; export LOGS
PATH=$ORACLE_HOME/bin:/grid/11.2.0/bin:$DBA:/usr/bin:/usr/sbin:/etc:/sbin:/bin
PATH=$PATH:/oracle/admin/scripts/
export PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
export CLASSPATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
ORAENV_ASK=NO; export ORAENV_ASK
# Skip the prompt for the ORACLE_SID. (Executed only for non-interactive jobs).
if [ "`tty`" != "not a tty" ]
then
# Prompt for the desired ORACLE_SID for interactive jobs
. $ORACLE_HOME/bin/oraenv
fi
# Ensure one (and only one . is in the PATH)
case "$PATH" in
*.*) ;; # If already in the path?
*:) PATH=${PATH}.: ;; # If path ends in a colon?
"") PATH=. ;; # If path is null?
*) PATH=$PATH:. ;; # If none of the above?
esac
umask 177
PS_OPTS="-ef"
export PS_OPTS