ITPub博客

首页 > Linux操作系统 > Linux操作系统 > DP rman backup scripts

DP rman backup scripts

原创 Linux操作系统 作者:yhj20041128001 时间:2012-05-14 15:12:31 0 删除 编辑

備份archive log script

注意,備份archive log可以刪除上一次的,而且還可以備份controlfile.

run {
allocate channel 'dev_0' type 'sbt_tape'
 parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=glscmb2b,OB2BARLIST=glscmb2b_73_arch)';
allocate channel 'dev_1' type 'sbt_tape'
 parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=glscmb2b,OB2BARLIST=glscmb2b_73_arch)';
allocate channel 'dev_2' type 'sbt_tape'
 parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=glscmb2b,OB2BARLIST=glscmb2b_73_arch)';
allocate channel 'dev_3' type 'sbt_tape'
 parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=glscmb2b,OB2BARLIST=glscmb2b_73_arch)';
crosscheck archivelog all;
backup
 format 'glscmb2b_73_arch.dbf'
 archivelog all;
delete expired archivelog all;
delete archivelog until time 'sysdate - 2';
backup
 format 'glscmb2b_73_arch.dbf'
 current controlfile;
}

備份full db script

注意,備份full db可以刪除上一次的archive log.

run {
allocate channel 'dev_0' type 'sbt_tape'
 parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=glscmb2b,OB2BARLIST=glscmb2b_73_full)';
allocate channel 'dev_1' type 'sbt_tape'
 parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=glscmb2b,OB2BARLIST=glscmb2b_73_full)';
allocate channel 'dev_2' type 'sbt_tape'
 parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=glscmb2b,OB2BARLIST=glscmb2b_73_full)';
allocate channel 'dev_3' type 'sbt_tape'
 parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=glscmb2b,OB2BARLIST=glscmb2b_73_full)';
backup incremental level
 format 'glscmb2b_73_full.dbf'
 database;
crosscheck archivelog all;
backup
 format 'glscmb2b_73_full.dbf'
 archivelog all;
delete expired archivelog all;
delete archivelog until time 'sysdate - 1';
backup
 format 'glscmb2b_73_full.dbf'
 current controlfile;
}

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23757700/viewspace-723525/,如需转载,请注明出处,否则将追究法律责任。

下一篇: ogg 軟體下載
请登录后发表评论 登录
全部评论

注册时间:2010-09-17

  • 博文量
    162
  • 访问量
    355172