Database Administration (MOSC)

MOSC Banner

crontab does not work

edited Apr 18, 2015 10:01AM in Database Administration (MOSC) 7 commentsAnswered

I have following script, which works manually, but not from crontab

#!/bin/bash

export TMP=/tmp

export TMPDIR=$TMP

export PATH=/usr/sbin:/usr/local/bin:$PATH

export ORACLE_UNQNAME=orauat

export ORACLE_SID=orauat_2

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOSTNAME=******.net

export ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/dbhome_1

#ORAENV_ASK=NO

#. oraenv

#ORAENV_ASK=YES

# Stop Database

sqlplus / as sysdba << EOF

SHUTDOWN IMMEDIATE;

EXIT;

EOF

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center