配置rman來自動刪除應用過的歸檔日誌
Configure Rman to Purge Application standby logs.
Posted on
Configure RMAN to purge archivelogs after Application on standby.
Applying to EE Version 10.2.0.1 – 11.2.0.1, and 10.2 to 11.2, We need RMAN to automatically purge archivelogs from the FRA once they are applied to the standby database.
With dataguard, and archives in the FRA, they will be purged if they have been applied on the standby and they are no longer required when there is space pressure on the FRA on the primary database.
Here’s the important part, before 11g, if not using archivelog destinations which are mandatory, then the database must be restarted after setting the following parameter:
1) prior to 11g, if not using mandatory archivelog destinations, the database (primary and standby) must be restarted with the following parameter:
SQL> alter system set “_log_deletion_policy”=’ALL’ scope=spfile;
Then we can configure the parameter as normal.
2) configure the following parameter in RMAN on both the primary and standby databases:
RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
3) the archivelog must have been applied to the standby
4) the archivelogmust beobsolete per the current RMAN retention policy.
To list the obsolete objects, run the following query:
RMAN> SHOW RETENTION POLICY RMAN> REPORT OBSOLETE;
5) there is space pressure in the FRA
Again, point 5, there has to be space pressure in the FRA before the policy kicks in. Therefore setting any normal local destination to use this will fail. In my experience the rman delete command complained that the logs were still required.
Another interesting note, the database’s have to be backed up for this policy to take place. Only performing backups on the standby will leave the primary in a state where all logs are required (obviously) since condition 4 will not be met, therefore no automatic purging will take place.
eg: the following query will identify all archivelogs applied to the standby:
select a.thread#, a.sequence#, a.applied from v$archived_log a, v$database d where a.activation# = d.activation# and a.applied=’YES’ /
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12798004/viewspace-2214484/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20221121]rman刪除歸檔日誌問題.txt
- oracle 刪除過期的歸檔日誌Oracle
- 通過RMAN設定standby接收日誌後主庫歸檔日誌才可刪除
- oracle rman 刪除過期的歸檔Oracle
- RMAN刪除歸檔日誌出現RMAN-0813錯誤的處理
- 手工rm刪除歸檔日誌對備份歸檔日誌的影響
- Oralce資料庫關閉歸檔日誌並且刪除歸檔日誌資料庫
- oracle adg主庫通過rman無法刪除歸檔Oracle
- rman 還原歸檔日誌(restore archivelogRESTHive
- ORACLE NBU調取oracle rman指令碼備份歸檔不自動刪除歸檔Oracle指令碼
- 在Oracle中,如何定時刪除歸檔日誌檔案?Oracle
- RMAN備份整庫和歸檔日誌的方法
- oracle rman備份歸檔日誌需要先切換日誌嗎Oracle
- RMAN正確地刪除Archivelog以及設定有備庫的歸檔刪除策略Hive
- log4j2定期刪除日誌檔案的配置
- 在ASM磁碟組中刪除歸檔日誌報ORA-15028ASM
- 達夢資料庫DM8之刪除歸檔日誌檔案資料庫
- ADG刪除應用完畢的日誌
- [轉] MySQL binlog 日誌自動清理及手動刪除MySql
- log4j2 自動刪除過期日誌檔案配置及實現原理解析
- 刪除歸檔
- 【Oracle】歸檔日誌管理-設定歸檔日誌路徑以及歸檔日誌冗餘Oracle
- DG_保證歸檔日誌不能隨意被刪除的四種方法
- Oracle設定多個歸檔路徑生成多份歸檔日誌,Rman備份時也只備份其中的一份歸檔日誌Oracle
- oracle刪除日誌Oracle
- 歸檔日誌挖掘
- PostgreSQL 歸檔日誌SQL
- oracle歸檔日誌Oracle
- RMAN-ERROR:因為找不到過期和丟失的歸檔日誌而備份失敗Error
- MogDB/openGauss誤刪未歸檔的xlog日誌如何解決
- elasticsearch日誌刪除命令Elasticsearch
- 歸檔oracle alert日誌Oracle
- 14. 日誌歸檔
- Oracle歸檔日誌清理Oracle
- 測試在丟失歸檔日誌的情況下,跳過部分歸檔日誌進行資料恢復資料恢復
- 在Linux中,有一堆日誌檔案,如何刪除7天前的日誌檔案?Linux
- Rman在run命令塊裡臨時設定歸檔目錄,歸檔日誌能否恢復主要看預設的歸檔路徑
- Java - 自動配置log4j的日誌檔案路徑Java