xifenfei 发表于 2014-3-28 23:22:14

11.2 standby 库清理归档技巧

在11.2之前的版本中,如果你配置了dataguard会有个烦心的事情,就是要写脚本,定时清理备库的归档日志,如果长期不清理,可能导致备库因为归档满了而hang住。从11.2开始oracle考虑到大家在该问题上的烦恼,做了一些改进,让oracle自动清理备库归档
1.在rman中配置CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;
2.归档存放到USE_DB_RECOVERY_FILE_DEST中
oracle就会自动管理备库的归档清理,无需人工干预,下面alert日志自动删除结果:
Fri Mar 28 13:58:22 2014
Deleted Oracle managed file /u01/app/oracle/fast_recovery_area/QSNGDG/archivelog/2014_03_16/o1_mf_1_1060_9lbhn5vt_.arc
Archived Log entry 768 added for thread 1 sequence 1340 ID 0xe3ba0ad3 dest 1:
Fri Mar 28 14:01:33 2014
RFS: Selected log 10 for thread 1 sequence 1342 dbid -474355757 branch 837621909
Fri Mar 28 14:01:33 2014
Deleted Oracle managed file /u01/app/oracle/fast_recovery_area/QSNGDG/archivelog/2014_03_16/o1_mf_1_1061_9lbhn60k_.arc
Archived Log entry 769 added for thread 1 sequence 1341 ID 0xe3ba0ad3 dest 1:
Fri Mar 28 14:01:33 2014
Media Recovery Waiting for thread 1 sequence 1342 (in transit)
Recovery of Online Redo Log: Thread 1 Group 10 Seq 1342 Reading mem 0
Mem# 0: /u01/app/oracle/oradata/qsng/std_redo10.log
RFS: Selected log 11 for thread 1 sequence 1343 dbid -474355757 branch 837621909
Fri Mar 28 14:01:34 2014
Deleted Oracle managed file /u01/app/oracle/fast_recovery_area/QSNGDG/archivelog/2014_03_16/o1_mf_1_1062_9lbhpww2_.arc
Archived Log entry 770 added for thread 1 sequence 1342 ID 0xe3ba0ad3 dest 1:
Media Recovery Waiting for thread 1 sequence 1343 (in transit)
Recovery of Online Redo Log: Thread 1 Group 11 Seq 1343 Reading mem 0
Mem# 0: /u01/app/oracle/oradata/qsng/std_redo11.log




页: [1]
查看完整版本: 11.2 standby 库清理归档技巧