常用脚本:
-----1. 0级备份
批处理文件:
set Oracle_SID=orcl
rman target sys/test@orcl cmdfile= "S:/backup/scripts/0/db_fullbakup_orcl.rman" LOG="S:/backup/log/rman_backup_%DATE:~0,4%%DATE:~5,2%%DATE:~8,2%.log"rman脚本:
run {
configure retention policy to recovery window of 14 days;
configure controlfile autobackup on;
configure controlfile autobackup format for device type disk to "S:ackupcontrolfileak_%F";
allocate channel c1 device type disk format "S:ackupdataak_%u";
allocate channel c2 device type disk format "S:ackupdataak_%u";
backup incremental level=0 database skip inaccessible
plus archivelog filesperset 20
delete all input;
release channel c1;
release channel c2;
}
allocate channel for maintenance device type disk;
crosscheck backupset;
delete noprompt obsolete;-----2. 1级备份
批处理文件:
set ORACLE_SID=orcl
rman target sys/test@orcl cmdfile="S:/backup/scripts/1/db_fullbakup_orcl.rman" LOG="S:/backup/log/rman_backup_%DATE:~0,4%%DATE:~5,2%%DATE:~8,2%.log"
rman脚本:
run {
configure retention policy to recovery window of 14 days;
configure controlfile autobackup on;
configure controlfile autobackup format for device type disk to "S:ackupcontrolfileak_%F";
allocate channel c1 device type disk format "S:ackupdataak_%u";
allocate channel c2 device type disk format "S:ackupdataak_%u";
backup incremental level=1 cumulative database skip inaccessible
plus archivelog filesperset 20
delete all input;
release channel c1;
release channel c2;
}
allocate channel for maintenance device type disk;
crosscheck backupset;
delete noprompt obsolete;更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12Oracle备份如何到异机还原Oracle- insert性能优化相关资讯 Oracle备份
- 利用Oracle自带的impdp和expdp进行 (05月18日)
- Oracle 10.2.0.5 版本之后 asm (08/08/2014 11:02:09)
- Linux系统中Oracle自动备份方案 (07/25/2014 13:11:25)
| - Java实现Oracle数据库备份 (08/12/2014 11:24:51)
- Oracle备份与恢复系列 (08/01/2014 09:15:02)
- Oracle exp imp备份、恢复表空间数 (06/15/2014 11:38:40)
|
本文评论 查看全部评论 (0)