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/