crontab 里不能运行expdp

编辑脚本 xxx.sh

#!/bin/sh
rq=`date +%Y%m%d`
filename="test$rq"
expdp system/*** directory=expdump dumpfile=$filename.dmp logfile=$filename.log schemas=test content=data_only


手工能够运行OK,满以为都OK 结果放进了CRONTAB里 第二天却没有运行,被叼毛叼了几句!

原因可能有:

1 环境问题  最好来个  source ~/.bash_profile

2 路径问题  那好 我们来个绝对路径

3 SH问题   EXPDP不运行SH变量 dumpfile=$filename,办法有 dumpfile=xxxooo.dmp  ......   mv xxxooo.dmp   $filename

版权声明:本文博主原创文章,博客,未经同意不得转载。

posted @ 2015-09-18 19:09  phlsheji  阅读(408)  评论(0编辑  收藏  举报