11g 上RMAN-08137的處理

darren__chan發表於2015-04-08

發現11.2.0.2的物理備庫無法刪除過期日誌,刪除指令碼如下

[oracle@report-db01 ~]$ more /home/oracle/monitor/deletearchivelog.sh

. /home/oracle/.bash_profile

rman target / @/home/oracle/monitor/deletearchivelog > /home/oracle/monitor/deletearchivelog.log

 

[oracle@report-db01 ~]$ more /home/oracle/monitor/deletearchivelog

crosscheck archivelog all;

delete noprompt force archivelog until time 'sysdate-1/4';

 

其中報錯日誌為

RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process

 

此為11gbug,需要在delete後加上force關鍵字,metalink上有記載

RMAN-08137 When deleting archivelogs even when Streams CAPTURE does not require them [ID 1079953.1]


 

修改時間 27-FEB-2011     型別 PROBLEM     狀態 PUBLISHED

 

In this Document
  
  
  
  
  


Symptoms

Applies To: 11gR1-11gR2

RMAN is unable to delete archive logs from database even though they are not needed by CAPTURE process anymore.

Changes

 

Cause

In 11g, RMAN looks at MIN_REQUIRED_CAPTURE_CHANGE# in v$database and not at DBA_CAPTURE. By default this value is updated every 6 hours. So by default the value in v$database will be six hours behind the current value.

Solution

Since changing frequency of update to MIN_REQUIRED_CAPTURE_CHANGE# in v$database can not be controlled, following workaround can be used:

Archive log which are not needed by capture process can be deleted using:


delete noprompt force archivelog all completed before 'sysdate-10/1440';



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29863023/viewspace-1543386/,如需轉載,請註明出處,否則將追究法律責任。

相關文章