您的位置:首页 > 数据库 > Oracle

Linux&Solaris下Oracle自动备份

2013-02-05 10:45 260 查看
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执行备份。

**********本博客所有内容均为原创,如有转载请注明作者和出处!!!**********

Name: guoyJoe

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
_____________________________________________________________

加群验证问题:哪些SGA结构是必需的,哪些是可选的?否则拒绝申请!!!

答案在:/article/1630191.html

Oracle@Paradise  总群:127149411

Oracle@Paradise No.1群:177089463(已满)

Oracle@Paradise No.2群:121341761

Oracle@Paradise No.3群:140856036

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: