Checking for Oracle archive log corruption [ID 1268590.1]

日志挖掘可以验证归档日志是否损坏。

Goal

EXTRACT is hung reading an archive log. OGG trace and o/s truss outputs show EXTRACT repeatedly accessing the next archive log but not progressing or generating an error. How can I verify that the log is not corrupted?

Solution

Try processing that archive log using logminer and see if logminer can access the file header info:

SQL> exec
dbms_logmnr.add_logfile('/.arc');
SQL> exec dbms_logmnr.start_logmnr;
SQL> select count(1) from v$logmnr_contents;

When the archive file is good, you will be able to execute logmnr and select from the view:

os> sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Tue Dec 7 09:51:58 2010

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> exec dbms_logmnr.add_logfile('/rdbms/oracle/ora1022i/64/admin/ora1022a/arch/1_mf_1_879_56dggmtf_.arc');

PL/SQL procedure successfully completed.

SQL> exec dbms_logmnr.start_logmnr;

PL/SQL procedure successfully completed.

SQL> select count(1) from v$logmnr_contents;

COUNT(1)
----------
18466


If the archive is bad, logmnr will not be able to access it:


SQL> exec dbms_logmnr.add_logfile('/rdbms/oracle/ora1022i/64/admin/ora1022a/arch/
wqbsqa01_652800616_1_4265.arc');
BEGIN dbms_logmnr.add_logfile('/rdbms/oracle/ora1022i/64/admin/ora1022a/arch/wqbsqa01_652800616_1_4265.arc'); END;

*
ERROR at line 1:
ORA-01284: file
/rdbms/oracle/ora1022i/64/admin/ora1022a/arch/wqbsqa01_652800616_1_4265.arc cannot be opened
ORA-00308: cannot open archived log
'/rdbms/oracle/ora1022i/64/admin/ora1022a/arch/wqbsqa01_652800616_1_4265.arc'
ORA-27047: unable to read the header block of file
OSD-04001: invalid logical block size (OS 3899694081)
ORA-06512: at "SYS.DBMS_LOGMNR", line 68
ORA-06512: at line 1[@more@]

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

转载于:http://blog.itpub.net/161195/viewspace-1057161/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值