-
Recent Posts
Recent Comments
- yangtingkun on 非空字段空值对查询的影响
- Eric Zong on 非空字段空值对查询的影响
- Kamus on Oracle Ace Director
- 设置全局死锁优先级 | yangtingkun on RAC全局死锁检测时间
- ORA-600(krbounotread_noctx)错误 | yangtingkun on ORA-600(krboReadBitmap_badbitmap)错误
Archives
- December 2020
- February 2019
- December 2018
- November 2018
- October 2018
- July 2018
- June 2018
- May 2018
- July 2016
- July 2013
- June 2013
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
Categories
Meta
Tag Archives: CRONTAB
CRONTAB调用的备份脚本
EXP备份是DBA常规操作之一,尤其是10g以前的版本没有EXPDP,所有的逻辑备份都是通过EXP来实现。而将EXP写成SHELL脚本,使之可以调用也并没有什么特别之处。不过如果并非oracle用户执行,而是需要CRONTAB自动允许,那么备份的脚本就有一些要求了。 客户环境使用RMAN CATALOG方式备份,而RMAN的CATALOG数据库采用EXP进行逻辑备份。部署了一个每天7点运行的CRONTAB,调用执行EXP的SHELL。巡检时发现这个脚本从未真正运行过。 /app/oracle10g> crontab -l 0 7 * * * /app/oracle10g/rman_catalog_dmp/exp_by_date.sh /app/oracle10g/rman_catalog_dmp> more exp_by_date.sh export ORACLE_SID=RMANDB export ORACLE_BASE=/app/oracle10g export ORACLE_HOME=$ORACLE_BASE/product/10.2.0 export NLS_LANG=American_America.ZHS16CGB231280 EXP parfile=EXP.par file=./rman_catalog.dmp log=./rman_catalog.log/app/oracle10g> crontab -l 0 7 * * * /app/oracle10g/rman_catalog_dmp/exp_by_date.sh /app/oracle10g/rman_catalog_dmp> more exp_by_date.sh export ORACLE_SID=RMANDB … Continue reading