oracle 归档日志删除策略

未设置归档删除策略时,

rman target  /

delete archivelog all;

可以直接删除归档。

如果设置了归档删除策略,delete archivelog all; 不能删除。如果加上 force 关键字可以删除。 

RMAN> configure archivelog deletion policy to backed up 1 times to disk;

new RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO DISK;
new RMAN configuration parameters are successfully stored

RMAN> list  archivelog all;

List of Archived Log Copies for database with db_unique_name CDB1
=====================================================================

Key     Thrd Seq     S Low Time 
------- ---- ------- - ---------
237     1    366     A 28-APR-24
        Name: /home/oracle/arch/1_366_1163583990.dbf

238     1    367     A 28-APR-24
        Name: /home/oracle/arch/1_367_1163583990.dbf


RMAN> delete archivelog all;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=278 device type=DISK
RMAN-08138: warning: archived log not deleted - must create more backups
archived log file name=/home/oracle/arch/1_366_1163583990.dbf thread=1 sequence=366
RMAN-08138: warning: archived log not deleted - must create more backups
archived log file name=/home/oracle/arch/1_367_1163583990.dbf thread=1 sequence=367

RMAN> delete noprompt archivelog all;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=278 device type=DISK
RMAN-08138: warning: archived log not deleted - must create more backups
archived log file name=/home/oracle/arch/1_366_1163583990.dbf thread=1 sequence=366
RMAN-08138: warning: archived log not deleted - must create more backups
archived log file name=/home/oracle/arch/1_367_1163583990.dbf thread=1 sequence=367

RMAN> delete force noprompt archivelog all;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=278 device type=DISK
List of Archived Log Copies for database with db_unique_name CDB1
=====================================================================

Key     Thrd Seq     S Low Time 
------- ---- ------- - ---------
237     1    366     A 28-APR-24
        Name: /home/oracle/arch/1_366_1163583990.dbf

238     1    367     A 28-APR-24
        Name: /home/oracle/arch/1_367_1163583990.dbf

deleted archived log
archived log file name=/home/oracle/arch/1_366_1163583990.dbf RECID=237 STAMP=1167479060
deleted archived log
archived log file name=/home/oracle/arch/1_367_1163583990.dbf RECID=238 STAMP=1167479061
Deleted 2 objects


RMAN> list archivelog all;

specification does not match any archived log in the repository

RMAN> 

相关推荐

  1. oracle 归档日志删除策略

    2024-04-29 16:28:01       33 阅读
  2. oracle归档日志清理

    2024-04-29 16:28:01       42 阅读
  3. oracle 关闭归档

    2024-04-29 16:28:01       40 阅读
  4. oracle数据归档方案

    2024-04-29 16:28:01       29 阅读
  5. oracle 清理归档日志

    2024-04-29 16:28:01       60 阅读
  6. Oracle数据库日志文件

    2024-04-29 16:28:01       43 阅读
  7. Oracle 日志挖掘

    2024-04-29 16:28:01       39 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-29 16:28:01       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-29 16:28:01       106 阅读
  3. 在Django里面运行非项目文件

    2024-04-29 16:28:01       87 阅读
  4. Python语言-面向对象

    2024-04-29 16:28:01       96 阅读

热门阅读

  1. VUE3与Uniapp 二 (响应式变量ref)

    2024-04-29 16:28:01       32 阅读
  2. 智商测试:一部跨越世纪的争议史(包含API接口

    2024-04-29 16:28:01       35 阅读
  3. stable-diffusion教程

    2024-04-29 16:28:01       29 阅读
  4. git使用

    git使用

    2024-04-29 16:28:01      29 阅读
  5. 目标检测(二阶段)领域,常见词汇

    2024-04-29 16:28:01       28 阅读
  6. Python设计模式(一)

    2024-04-29 16:28:01       31 阅读
  7. Mysql:常见问题

    2024-04-29 16:28:01       28 阅读
  8. 【运维】Docker Compose 安装 Nacos

    2024-04-29 16:28:01       28 阅读