欢迎来到天天文库
浏览记录
ID:9280992
大小:27.50 KB
页数:3页
时间:2018-04-26
《oracle rman备份脚本》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、oraclerman备份脚本2,常用备份脚本:备份到磁盘:(如果是磁带,将DISK改成'SBT_TAPE')0级备份脚本:RUN{ALLOCATECHANNELch00TYPEDISK;ALLOCATECHANNELch01TYPEDISK;BACKUP INCREMENTALLEVEL=0 SKIPINACCESSIBLE TAGhot_db_bk_level0 FILESPERSET5 FORMAT'bk_%s_%p_%t' DATABASE; sql'altersystem
2、archivelogcurrent';RELEASECHANNELch00;RELEASECHANNELch01;ALLOCATECHANNELch00TYPEDISK;ALLOCATECHANNELch01TYPEDISK;BACKUP filesperset20 FORMAT'al_%s_%p_%t' ARCHIVELOGALLDELETEINPUT;RELEASECHANNELch00;RELEASECHANNELch01;ALLOCATECHANNELch00TYPEDISK;BACKUP
3、 FORMAT'cntrl_%s_%p_%t' CURRENTCONTROLFILE;RELEASECHANNELch00;}1级差异增量备份:RUN{ALLOCATECHANNELch00TYPEDISK;ALLOCATECHANNELch01TYPEDISK;BACKUP INCREMENTALLEVEL=1 SKIPINACCESSIBLE TAGhot_db_bk_level0 FILESPERSET5 FORMAT'bk_%s_%p_%t' DATABASE; sq
4、l'altersystemarchivelogcurrent';RELEASECHANNELch00;RELEASECHANNELch01;ALLOCATECHANNELch00TYPEDISK;ALLOCATECHANNELch01TYPEDISK;BACKUP filesperset20 FORMAT'al_%s_%p_%t' ARCHIVELOGALLDELETEINPUT;RELEASECHANNELch00;RELEASECHANNELch01;ALLOCATECHANNELch00TYPE
5、DISK;BACKUP FORMAT'cntrl_%s_%p_%t' CURRENTCONTROLFILE;RELEASECHANNELch00;}1级累积增量备份脚本:RUN{ALLOCATECHANNELch00TYPEDISK;ALLOCATECHANNELch01TYPEDISK;BACKUP INCREMENTALLEVEL=1CUMULATIVE SKIPINACCESSIBLE TAGhot_db_bk_level0 FILESPERSET5 FORMAT'bk_%
6、s_%p_%t' DATABASE; sql'altersystemarchivelogcurrent';RELEASECHANNELch00;RELEASECHANNELch01;ALLOCATECHANNELch00TYPEDISK;ALLOCATECHANNELch01TYPEDISK;BACKUP filesperset20 FORMAT'al_%s_%p_%t' ARCHIVELOGALLDELETEINPUT;RELEASECHANNELch00;RELEASECHANNELch0
7、1;ALLOCATECHANNELch00TYPEDISK;BACKUP FORMAT'cntrl_%s_%p_%t' CURRENTCONTROLFILE;RELEASECHANNELch00;}恢复脚本:RUN{ALLOCATECHANNELch00TYPEDISK;ALLOCATECHANNELch01TYPEDISK;RESTOREDATABASE;RECOVERDATABASE;RELEASECHANNELch00;RELEASECHANNELch01;}
此文档下载收益归作者所有