Friday, 19 April 2013

How to validate oracle redo/archived logs? ( Oracle 11g R1)

Recently we've learnt that one of our archived redo logs was corrupted (by sending it to a third party tool, CDC, which could not use it).
The question was, is there a way to validate the archived redo log?

The answer is yes and the method is:


SQL> alter system dump logfile  '/u01/app/oracle/Dmp/TESTDB_1799337628_4642.arc';
alter system dump logfile  '/u01/app/oracle/Dmp/TESTDB_1799337628_4642.arc'
*
ERROR at line 1:
ORA-00368: checksum error in redo log block
ORA-00353: log corruption near block 1822722 change 10154296873806 time
04/17/2013 03:14:22
ORA-00334: archived log: '/u01/app/oracle/Dmp/TESTDB_1799337628_4642.arc'


This command will generate a detailed trace file in the user dump destination.

We could even generate a smaller trace file, having the error inside, by running the same command, but on a block range:


SQL> alter system dump logfile  '/u01/app/oracle/Dmp/TESTDB_1799337628_4642.arc' dba min 4642 1822700 dba max 4642 1822800;
alter system dump logfile  '/u01/app/oracle/Dmp/TESTDB_1799337628_4642.arc' dba min 4642 1822700 dba max 4642 1822800
*
ERROR at line 1:
ORA-00368: checksum error in redo log block
ORA-00353: log corruption near block 1820688 change 10154296880830 time
04/17/2013 03:14:24
ORA-00334: archived log: '/u01/app/oracle/Dmp/TESTDB_1799337628_4642.arc'

 More details on My Oracle Supprt, ID 1031381.6

No comments:

Post a Comment