原文链接: Oracle 11g 删除归档日志

Oracle 11g 删除归档日志

操作步骤

1
2
$ bin/sqlplus / as sysdba
RMAN> delete archivelog all completed before 'sysdate-1';

具体操作及输出
```
$ bin/rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Fri Apr 28 10:53:28 2017

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

connected to target database: ORCL (DBID=1451205847, not open)

RMAN> list expired archivelog all;

specification does not match any archived log in the repository

RMAN> delete expired archivelog all;

using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=5 device type=DISK
specification does not match any archived log in the repository

RMAN> delete archivelog all completed before ‘sysdate-1’;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=5 device type=DISK

List of Archived Log Copies for database with db_unique_name ORCL

Key Thrd Seq S Low Time


1 1 45 A 09-MAR-17
Name: /home/kylin/app/kylin/flash_recovery_area/ORCL/archivelog/2017_03_09/o1_mf_1_45dd2qz3wo.arc

100 1 144 A 26-APR-17
Name: /home/kylin/app/kylin/flash_recovery_area/ORCL/archivelog/2017_04_27/o1_mf_1_144dj2py4mv.arc

Do you really want to delete the above objects (enter YES or NO)? YES
deleted archived log
archived log file name=/home/kylin/app/kylin/flash_recovery_area/ORCL/archivelog/2017_03_09/o1_mf_1_45dd2qz3wo.arc RECID=1 STAMP=938210404

deleted archived log
archived log file name=/home/kylin/app/kylin/flash_recovery_area/ORCL/archivelog/2017_04_27/o1_mf_1_144dj2py4mv.arc RECID=100 STAMP=942403653
Deleted 100 objects
```e