關於oracle rman 歸檔刪除策略,oraclerman

來源:互聯網
上載者:User

關於oracle rman 歸檔刪除策略,oraclerman
RMAN> show all;

CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;

在oracle10g 11g 中  歸檔刪除策略 預設是沒有配置的;

那麼這時去刪除未應用過的的歸檔日誌會是怎麼一種情況:


RMAN> delete archivelog all;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=60 device type=DISK
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process

archived log file name=/u01/app/ora11/flash_recovery_area/1_2019_822927217.dbf thread=1 sequence=2019
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process

archived log file name=/u01/app/ora11/flash_recovery_area/1_2023_822927217.dbf thread=1 sequence=2023
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process


oracle 拋出警示;warning 歸檔日誌沒有刪除,歸檔日誌需要用作standby 或者 stream 捕獲進程使用


關於rman中這個配置策略:

CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY

不是自動刪除歸檔。而是刪除的時候確認歸檔已經被DATA GUARD、流環境所應用。這個功能的目的是避免刪除其他功能所需要的歸檔日誌。


如果配置歸檔刪除策略:

CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/db_home/dbs/snapcf_oradb1.f'; # default

嘗試刪除歸檔日誌:
RMAN>  delete archivelog all;


released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=27 instance=oradb1 device type=DISK
List of Archived Log Copies for database with db_unique_name ORADB
=====================================================================

Key     Thrd Seq     S Low Time            
------- ---- ------- - --------------------
2526    2    350     A 22-NOV-2014 02:01:04
        Name: +FLASH/oradb/archivelog/2014_11_24/thread_2_seq_350.600.864470143
2527    2    351     A 23-NOV-2014 13:01:27
        Name: +FLASH/oradb/archivelog/2014_11_24/thread_2_seq_351.620.864470173
2531    2    352     A 24-NOV-2014 10:29:04
        Name: +FLASH/oradb/archivelog/2014_11_26/thread_2_seq_352.554.864634011




Do you really want to delete the above objects (enter YES or NO)? yes
deleted archived log
archived log file name=+FLASH/oradb/archivelog/2014_11_24/thread_2_seq_350.600.864470143 RECID=2526 STAMP=864470171
deleted archived log
archived log file name=+FLASH/oradb/archivelog/2014_11_24/thread_2_seq_351.620.864470173 RECID=2527 STAMP=864470193
deleted archived log
archived log file name=+FLASH/oradb/archivelog/2014_11_26/thread_2_seq_352.554.864634011 RECID=2531 STAMP=864634090
Deleted 3 objects


RMAN-08591: WARNING: invalid archived log deletion policy



[oracle@vmrac1 ~]$ oerr rman 8591
8591, 3, "WARNING: invalid archived log deletion policy"
// *Cause: An invalid ARCHIVELOG DELETION POLICY was supplied. The archived
//         log deletion policy was APPLIED but there was no mandatory
//         archived log destinations.
// *Action: One of the following:
//          1) Change archived log deletion policy using CONFIGURE command
//          2) Make one or more of standby destination as MANDATORY.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.