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

parknkjun發表於2014-12-05
客戶資料庫備份日誌報錯:RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process,
DB版本為11.2.0.1,根據備策略,每天備份歸檔,並且自動刪除檔,保留兩個星期的歸檔,手功執如下命令:
delete noprompt archivelog until time 'sysdate-14';
依然報錯,資訊如下:
 RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=E:\ORAARCH\JZH\ARC0000218319_0796336681.0001 thread=1 sequence=218319
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=E:\ORAARCH\JZH\ARC0000218320_0796336681.0001 thread=1 sequence=218320
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=E:\ORAARCH\JZH\ARC0000218321_0796336681.0001 thread=1 sequence=218321
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=E:\ORAARCH\JZH\ARC0000218322_0796336681.0001 thread=1 sequence=218322
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=E:\ORAARCH\JZH\ARC0000218323_0796336681.0001 thread=1 sequence=218323
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=E:\ORAARCH\JZH\ARC0000218324_0796336681.0001 thread=1 sequence=218324
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=E:\ORAARCH\JZH\ARC0000218325_0796336681.0001 thread=1 sequence=218325


搜尋MOS,發現這是11g中的一個bug,需要在delete 後面加上force,mos描述如下:
—————————————————————————————————————————————————————————————————————————
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';
_________________________________________________________________________________________________________________________________________

最後加上force關鍵字,手動執行delete noprompt force archivelog until time 'sysdate-14'; 成功將歸檔刪除!



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

相關文章