1、在备份目录下(如:/u01/oracle/oradata/databak) 用vi命令创建一个autoexp.sh文件,添加以下内容: D=$(date +%d); export D; su - oracle -c "exp lxxt/zjlg_lxxt owner=lxxt file=/u01/oracle/oradata/databak/lxxt${D}.dmp" ----如果在solaris的环境中,就用下面的命令 --su - oracle -c "exp zsxt/zfsoft owner=zsxt file=/u01/oracle/oradata/databak/`date '+%y%m%d'`.dmp" 2、修改autoexp.sh的属性:chmod 755 autoexp.sh 3、建立Crontab文件 以root身份执行 cd /var/spool/cron crontab –e 输入以下内容: 00 23 * * * /u01/oracle/oradata/databak/autoexp.sh --表示每天23:00执行备份。
**********本博客所有内容均为原创,如有转载请注明作者和出处!!!********** QQ: 252803295 Email: oracledba_cn@hotmail.com Blog: http://blog.csdn.net/guoyJoe ITPUB: http://www.itpub.net/space-uid-28460966.html OCM: http://education.oracle.com/education/otn/YGuo.HTM 答案在:http://blog.csdn.net/guoyjoe/article/details/8624392 Oracle@Paradise 总群:127149411 Oracle@Paradise No.1群:177089463(已满) Oracle@Paradise No.2群:121341761 Oracle@Paradise No.3群:140856036 |
转载于:https://blog.51cto.com/guoyjoe/1429061