zl程序教程

您现在的位置是:首页 >  数据库

当前栏目

[Oracle]为何Archivelog 没有马上被删除

Oracle 删除 没有 为何 马上
2023-09-11 14:20:28 时间

[Oracle]为何Archivelog 没有马上被删除

客户设置了 Archivelog 的 deletion policy 是 CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;

所以,他认为只要在Standby 端提交了,就应该将此 Archivelog 自动删除。
但是,客户仍然发现 FRA 满了,所以提出了质疑。

经过调查,我认为,
删除不是马上发生的,只有当系统有需要时,才会进行。
Applied,只是保证这个Archivelog 成为了 删除的候选对象(reclaimable)

论据:
======================================================================
Oracle Database does not
delete eligible files from the flash recovery area
  until the space must be reclaimed for some other purpose. ***1
......
Oracle Database automatically deletes eligible files to reclaim space in the recovery area as needed. ***2
...
- Archived redo logs are not eligible for deletion
  until all the consumers of the logs have satisfied their requirements ( If Archived Redo Log Deletion Policy is set ) . ***4

论点:
======================================================================
  上面的 ***4 说:
       applied  之后,它们只是变成 eligible 。

  上面的 ***1 和 ***2 说:
      FRA有需要的时候,才会 删除的。

结论:
======================================================================
   applied 了,也不是马上就删除的。有需要的时候,由系统自动来删除。