手动删除归档日志

总结一个问题:

因手动删除归档日志rman报错

我的环境: linux as4 + oracle 10.2.0.3

今天我手动rm了一个归档日志,结果在rman做备份的时候报了如下错误:


RMAN> backup archivelog all delete input format '/home/oracle/log_backup/log_%s_%p_%t';

Starting backup at 2007-07-16 17:55:48
current log archived
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 07/16/2007 17:55:49
RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
ORA-19625: error identifying file /home/oracle/archive_log/1_18_627807837.dbf
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3

RMAN> quit


这该怎么办,我的rman怎么才能恢复备份?

手动删除归档日志后,需要

crosscheck archivelog all;
delete noprompt expired backup;

 

------------------------分割线----------------------------

某一个实验:

Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.

C:\Documents and Settings\RequieM>sqlplus " / as sysdba"

SQL*Plus: Release 9.2.0.7.0 - Production on 星期一 7月 16 23:54:37 2007

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

已连接到空闲例程。

SQL/IDLE> startup;
ORACLE 例程已经启动。

Total System Global Area  101785284 bytes
Fixed Size                   454340 bytes
Variable Size              75497472 bytes
Database Buffers           25165824 bytes
Redo Buffers                 667648 bytes
数据库装载完毕。
数据库已经打开。
SQL/IDLE> @glogin
SQL> show parameter log_archive_dest

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest                     string      
log_archive_dest_1                   string      LOCATION=F:\oracle\oradata\MYDB\archive
log_archive_dest_10                  string      
log_archive_dest_2                   string      
log_archive_dest_3                   string      
log_archive_dest_4                   string      
log_archive_dest_5                   string      
log_archive_dest_6                   string      
log_archive_dest_7                   string      
log_archive_dest_8                   string      
log_archive_dest_9                   string      
log_archive_dest_state_1             string      enable
log_archive_dest_state_10            string      enable
log_archive_dest_state_2             string      enable
log_archive_dest_state_3             string      enable
log_archive_dest_state_4             string      enable
log_archive_dest_state_5             string      enable
log_archive_dest_state_6             string      enable
log_archive_dest_state_7             string      enable
log_archive_dest_state_8             string      enable
log_archive_dest_state_9             string      enable

SQL> host dir F:\oracle\oradata\MYDB\archive

Volume in drive F is APPLICATION
Volume Serial Number is 684B-6ADC
Directory of F:\ORACLE\ORADATA\MYDB\ARCHIVE

.            

补充:rman里面的list copy of archivelog all;j就是查询select name,sequence#,archived,deleted,status from v$archived_log;

如果以后因为空间不够等原因不要手动删除archivelog,可以直接用rman的delete copy of archivelog from sequence XXXX until squence XXX删除archivelog及时释放空间,你可以在crontab里面写一角本检测空间,用v$archived_log自动生成上面的命令,删除archivelog及时释放空间。然后及时作全备.

总结:其实这个实验很好,但是步骤太繁杂了,只需要先crosscheck ,然后直接delete  expired  最好

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

转载于:http://blog.itpub.net/9390331/viewspace-691817/

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值