catalog 缺失的archivelog_20100308

catalog 缺失的archivelog

1 DG中发现备库中出现GAP
SQL> select * from v$archive_gap;

   THREAD# LOW_SEQUENCE# HIGH_SEQUENCE#
---------- ------------- --------------
         1            49             49
        

2 但在归档目录下有sequence=49的文件
SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /opt/oracle/archive/
Oldest online log sequence     47
Next log sequence to archive   0
Current log sequence           64


oracle@Z815:/opt/oracle/archive> ls /opt/oracle/archive/1_49.dbf
/opt/oracle/archive/1_49.dbf


3 尝试将其Catalog到control file 中

RMAN> CATALOG archivelog '/opt/oracle/archive/1_49.dbf';

cataloged archive log
archive log filename=/opt/oracle/archive/1_49.dbf recid=23 stamp=713113146

4 在alertxxx.log中出现如下错误信息

Mon Mar  8 14:59:14 2010
Media Recovery Log /opt/oracle/archive/1_49.dbf
Mon Mar  8 14:59:14 2010
Errors in file /opt/oracle/admin/mydb/bdump/mydb_mrp0_18592.trc:
ORA-00332: archived log is too small - may be incompletely archived
ORA-00334: archived log: '/opt/oracle/archive/1_49.dbf'
MRP0: Background Media Recovery terminated with error 332
Mon Mar  8 14:59:14 2010
Errors in file /opt/oracle/admin/mydb/bdump/mydb_mrp0_18592.trc:
ORA-00332: archived log is too small - may be incompletely archived
ORA-00334: archived log: '/opt/oracle/archive/1_49.dbf'
Recovery interrupted.
MRP0: Background Media Recovery process shutdown


5 查看trc文件,有类似错误信息

oracle@Z815:/opt/oracle/archive> cat  /opt/oracle/admin/mydb/bdump/mydb_mrp0_18592.trc
/opt/oracle/admin/mydb/bdump/mydb_mrp0_18592.trc
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
ORACLE_HOME = /opt/oracle/product/9ir2
System name:    Linux
Node name:      Z815
Release:        2.6.5-7.244-smp
Version:        #1 SMP Mon Dec 12 18:32:25 UTC 2005
Machine:        x86_64
Instance name: mydb
Redo thread mounted by this instance: 1
Oracle process number: 8
Unix process pid: 18592, image: oracle@Z815 (MRP0)

*** SESSION ID:(7.3) 2010-03-08 14:50:54.218
Background Managed Standby Recovery process started
*** 2010-03-08 14:50:59.245
Managed Recovery: Active posted.
*** 2010-03-08 14:59:14.511
Media Recovery Log /opt/oracle/archive/1_49.dbf
ORA-00332: archived log is too small - may be incompletely archived
ORA-00334: archived log: '/opt/oracle/archive/1_49.dbf'
Background Media Recovery terminated with error 332
ORA-00332: archived log is too small - may be incompletely archived
ORA-00334: archived log: '/opt/oracle/archive/1_49.dbf'
*** 2010-03-08 14:59:14.543
Managed Recovery: Not Active posted.
Background Media Recovery process shutdown
*** 2010-03-08 14:59:14.570

归档文件太小,怀疑是不完整的归档, MPR进程被终止.

 

6 重新拷贝新的归档文件

oracle@Z815:/opt/oracle/archive> scp oracle@10.230.17.34:/opt/oracle/archive/1_49.dbf ./
Password:
1_49.dbf                                                                                          100%   29MB   1.6MB/s   00:18   


7 重新Catalog


RMAN> CATALOG archivelog '/opt/oracle/archive/1_49.dbf';

cataloged archive log
archive log filename=/opt/oracle/archive/1_49.dbf recid=24 stamp=713113637


8 打开日志应用
SQL> alter database recover managed standby database disconnect from session;

Database altered.

9 查看 alert_xxx.log

Starting datafile 10 recovery in thread 1 sequence 49
Datafile 10: '/opt/oracle/oradata/mydb/xdb01.dbf'
Media Recovery Log /opt/oracle/archive/1_49.dbf
Mon Mar  8 15:08:00 2010
Completed: alter database recover managed standby database di
Mon Mar  8 15:08:05 2010
Media Recovery Log /opt/oracle/archive/1_50.dbf

功应用1_49.dbf


10 再次查看GAP
SQL> select * from v$archive_gap;

no rows selected


问题解决

 

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

转载于:http://blog.itpub.net/10248702/viewspace-628930/

归档日志(Archivelog)是Oracle数据库中的一种重要功能,用于记录数据库中进行的所有变更操作,包括数据修改、表结构变更等。归档日志可以用于数据恢复、灾难恢复和数据完整性保护。 当数据库启用了归档日志模式时,Oracle会将数据库日志文件的副本保存到一个或多个归档目标中,这些归档目标可以是本地磁盘、远程磁盘、磁带库等。归档日志的生成和传输是由Oracle的后台进程自动完成的。 归档日志对于数据库的重要性体现在以下几个方面: 1. 数据恢复:归档日志是数据库恢复的重要组成部分。在数据库发生故障或意外损坏时,可以使用归档日志进行恢复,使数据库回滚到最近一次完整备份之后的状态。 2. 灾难恢复:归档日志可以用于灾难恢复,即在数据库服务器发生灾难性故障时,可以使用归档日志将数据库恢复到最后一个可用状态,以减少数据丢失。 3. 数据完整性保护:归档日志记录了数据库中的所有变更操作,可以用于追踪和审计数据的修改,保护数据的完整性,确保数据的一致性。 要启用归档日志模式,需要在Oracle数据库中进行相应的配置和参数设置。可以使用ALTER DATABASE命令将数据库切换到归档日志模式,也可以通过修改初始化参数文件进行配置。 总之,归档日志是Oracle数据库中非常重要的功能,对于数据恢复、灾难恢复和数据完整性保护都起着关键的作用。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值