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

windows2008R2 ORACLE数据库RMANBK备份

2016-04-13 10:05 483 查看
BOPbk.bat

D:

cd D:\script

set ORACLE_SID=BOP

rman target / cmdfile='D:\script\rmanbk.txt' log='D:\script\BOP_full_rmanbk.log'

rmanbk.txt

run{

allocate channel c1 device type disk;

allocate channel c2 device type disk;

allocate channel c3 device type disk;

allocate channel c4 device type disk;

crosscheck backup;

sql 'alter system archive log current';

backup database format 'D:\rmanbk\db_%d_%T_%U';

sql 'alter system archive log current';

backup archivelog all format 'D:\rmanbk\arc_%t_%s' delete all input;

backup current controlfile format 'D:\rmanbk\cntrl_%s_%p_%s';

crosscheck archivelog all;

delete noprompt expired backup;

delete noprompt obsolete;

delete noprompt backup of database completed before 'sysdate - 7';

release channel c1;

release channel c2;

release channel c3;

release channel c4;

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