• FOREIGN ARCHIVED LOG


    参考文档:

    V$FOREIGN_ARCHIVED_LOG (oracle.com)

     Foreign Archived Logs Not Being Deleted On Logical Standby (Doc ID 2304461.1)

    今天在测试环境中,查询V$RECOVERY_AREA_USAGE的时候,发现foreign archived log 占用的空间较多。

    1. SYS@test PROD1>/
    2. FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
    3. ---------------------------------------- ------------------ ------------------------- ---------------
    4. CONTROL FILE 0 0 0
    5. REDO LOG .98 0 6
    6. ARCHIVED LOG 0 0 0
    7. BACKUP PIECE 0 0 0
    8. IMAGE COPY 0 0 0
    9. FLASHBACK LOG 0 0 0
    10. FOREIGN ARCHIVED LOG 74.97 0 699
    11. 7 rows selected.
    12. SYS@test PROD1>

    查询到的具体的文件信息如下:

    1. SYS@test PROD1>select name from V$FOREIGN_ARCHIVED_LOG where rownum <4;
    2. NAME
    3. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    4. +ARC/prod/archivelog/2021_11_12/thread_2_seq_180.761.1088382915
    5. +ARC/prod/archivelog/2021_11_12/thread_2_seq_181.762.1088386897
    6. +ARC/prod/archivelog/2021_11_12/thread_2_seq_182.763.1088389127
    7. SYS@test PROD1>

    -- 解决方法
    CROSSCHECK FOREIGN archivelog all;
    DELETE EXPIRED FOREIGN ARCHIVelog all;

    部分过程如下:

    foreign archived log file name=+ARC/prod/archivelog/2021_11_12/thread_2_seq_192.774.1088430487 RECID=13 STAMP=1114294303
    validation failed for foreign archived log
    foreign archived log file name=+ARC/prod/archivelog/2021_11_12/thread_2_seq_193.775.1088435813 RECID=14 STAMP=1114294303
    validation failed for foreign archived log
    foreign archived log file name=+ARC/prod/archivelog/2021_11_12/thread_2_seq_194.776.1088441877 RECID=15 STAMP=1114294303
    Crosschecked 699 objects

    RMAN> 
    deleted foreign archived log
    foreign archived log file name=+ARC/prod/archivelog/2021_11_12/thread_2_seq_192.774.1088430487 RECID=13 STAMP=1114294303
    deleted foreign archived log
    foreign archived log file name=+ARC/prod/archivelog/2021_11_12/thread_2_seq_193.775.1088435813 RECID=14 STAMP=1114294303
    deleted foreign archived log
    foreign archived log file name=+ARC/prod/archivelog/2021_11_12/thread_2_seq_194.776.1088441877 RECID=15 STAMP=1114294303
    Deleted 699 EXPIRED objects

    再次查看,不存在了

    1. SYS@test PROD1>select * from V$RECOVERY_AREA_USAGE;
    2. FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
    3. ---------------------------------------- ------------------ ------------------------- ---------------
    4. CONTROL FILE 0 0 0
    5. REDO LOG .98 0 6
    6. ARCHIVED LOG 0 0 0
    7. BACKUP PIECE 0 0 0
    8. IMAGE COPY 0 0 0
    9. FLASHBACK LOG 0 0 0
    10. FOREIGN ARCHIVED LOG 0 0 0
    11. 7 rows selected.
    12. SYS@test PROD1>

    这个环境不是一个逻辑备库环境。之前同一套库还原过多次。2次的归档日志,放在了同一个地方。所以被认为是foreign archived log .使用catalog注册这些归档的时候,其实还不认识这些归档。

    END。

  • 相关阅读:
    nginx-proxy-manager在线申请证书
    陪诊系统|陪诊助浴系统|养老护理系统开发功能
    秋招还没Offer怎么办?
    运算符重载
    穷举&&深搜&&暴搜&&回溯&&剪枝(4)
    三网话费余额查询的API系统 基于thinkphp6.0框架
    MongoDB操作、非关系型数据库存储
    5. JAVA 基础
    保健食品市场前景如何?
    STM32——DHT11温湿度传感器
  • 原文地址:https://blog.csdn.net/xxzhaobb/article/details/126745360