编辑脚本 xxx.sh
#!/bin/shrq=`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
版权声明:本文博主原创文章,博客,未经同意不得转载。
转载于:https://www.cnblogs.com/bhlsheji/p/4820146.html
相关资源:数据结构—成绩单生成器