crontab 中使用sqlplus

#!/bin/sh
# Setup ORACLE environment
ORACLE_HOME=/export/home/oracle/OraHome1
export ORACLE_HOME
ORACLE_SID=orcl
export ORACLE_SID
ORACLE_TERM=xterm
export ORACLE_TERM
ORACLE_OWNER=oracle
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/local/ssl/lib:/usr/local/lib
export LD_LIBRARY_PATH
NLS_LANG=AMERICAN_AMERICA.US7ASCII
export NLS_LANG
PATH=$JAVA_HOME/bin:$JAVA_HOME/jdk/jre/bin:/bin:/sbin:/usr/bin:/usr/sbin:$ORACLE_HOME/bin:/usr/ccs/bin:/usr/local/bin
export PATH
cd /data/sms/crontab/temp/
sqlplus wapgb/psdchg01 @temp.sql

你可能感兴趣的:(java,jdk,oracle,sql)