ITPub博客

首页 > 数据库 > Oracle > 更改归档模式

更改归档模式

原创 Oracle 作者:roc_phoenix 时间:2016-11-09 09:31:56 0 删除 编辑
shutdown immediate


startup mount;


alter database archivelog;


alter system set log_archive_dest_1='location=1';


alter database open;


archive log list;


alter system switch logfile;


select name from v$archived_log;










rman target / nocatalog log /oracle/rman/rman_log/rman_full_JDE_${date_format}.log <<EOF
run
{allocate channel c1 type disk;
allocate channel c2 type disk;
crosscheck archivelog all;
delete expired archivelog all;
crosscheck backup;
delete expired backup;
backup database format '/oracle/rman/databak/full_db_%d_%T_%s_%p.bak';
sql 'alter system archive log current';
sql 'alter system archive log current';
sql 'alter system archive log current';
backup archivelog all format '/oracle/rman/archive_bak/arch_%d_%T_%s_%p.bak';
backup current controlfile format '/oracle/rman/archive_bak/ctl_%d_%T_%s_%p.bak';
release channel c1;
release channel c2;
}


CONFIGURE RETENTION POLICY TO REDUNDANCY 3;


CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;

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

上一篇: 分区表常见汇总
下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2015-09-18

  • 博文量
    48
  • 访问量
    126590