rman的crosscheck命令

在操作系统上手动删除备份或归档,rman不会立即知晓此变更,所以需要crosscheck更新备份的状态。
手动rm归档日志
检查归档
RMAN> crosscheck archivelog all;
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
validation failed for archived log
archived log file name=/home/oracle/1_62_947085344.dbf RECID=5 STAMP=950278766
validation failed for archived log
archived log file name=/home/oracle/1_63_947085344.dbf RECID=6 STAMP=950279852
validation failed for archived log
archived log file name=/home/oracle/1_64_947085344.dbf RECID=7 STAMP=950455276
validation failed for archived log

archived log file name=/home/oracle/1_1_950712737.dbf RECID=72 STAMP=950712738
validation succeeded for archived log
archived log file name=/home/oracle/1_2_950712737.dbf RECID=73 STAMP=950713931
Crosschecked 60 objects


删除实效归档
RMAN> delete expired archivelog all;


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

Key     Thrd Seq     S Low Time           
------- ---- ------- - -------------------
5       1    62      X 2017-07-23 22:09:22
        Name: /home/oracle/1_62_947085344.dbf

6       1    63      X 2017-07-25 14:19:26
        Name: /home/oracle/1_63_947085344.dbf


7       1    64      X 2017-07-25 14:37:32
        Name: /home/oracle/1_64_947085344.dbf
。。。

71      1    119     X 2017-07-30 14:24:59
        Name: /home/oracle/1_119_947085344.dbf

72      1    1       X 2017-07-30 14:52:17
        Name: /home/oracle/1_1_950712737.dbf

73      1    2       X 2017-07-30 14:52:18
        Name: /home/oracle/1_2_950712737.dbf

Do you really want to delete the above objects (enter YES or NO)? yes
deleted archived log
archived log file name=/home/oracle/1_62_947085344.dbf RECID=5 STAMP=950278766
deleted archived log
archived log file name=/home/oracle/1_63_947085344.dbf RECID=6 STAMP=950279852
deleted archived log

STAMP=950711099
deleted archived log
archived log file name=/home/oracle/1_119_947085344.dbf RECID=71 STAMP=950712737
deleted archived log
archived log file name=/home/oracle/1_1_950712737.dbf RECID=72 STAMP=950712738
deleted archived log
archived log file name=/home/oracle/1_2_950712737.dbf RECID=73 STAMP=950713931
Deleted 60 EXPIRED objects

RMAN> list archivelog all;

specification does not match any archived log in the repository

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31461640/viewspace-2142800/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/31461640/viewspace-2142800/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值