频道栏目
首页 > 资讯 > Oracle > 正文

Oracle11g删除归档日志

17-04-29        来源:[db:作者]  
收藏   我要投稿

Oracle11g删除归档日志。

操作步骤

$ 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_45_dd2qz3wo_.arc
...

100     1    144     A 26-APR-17
        Name: /home/kylin/app/kylin/flash_recovery_area/ORCL/archivelog/2017_04_27/o1_mf_1_144_dj2py4mv_.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_45_dd2qz3wo_.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_144_dj2py4mv_.arc RECID=100 STAMP=942403653
Deleted 100 objects
相关TAG标签
上一篇:MAC OS查看端口占用情况及杀死进程
下一篇:SecureCRT中改变背景色和文字颜色
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站