Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RMAN Corrupted Blocks Identification

RMAN Corrupted Blocks Identification

From: Slava Zayarny <Slava.Zayarny_at_sas.com>
Date: Mon, 4 Apr 2005 10:57:08 -0400
Message-ID: <D4915B279E169F4992940DFF313EB4BF061361A7@MERC21.na.sas.com>

Hello list,

I'm trying to create a test scenario to understand what RMAN construes to be a "corrupted" block. The initial assumption is that its "backup validate check logical" command should identify such blocks. =20

Here's the test I ran.

Environment:

HP-UX 11.11
Oracle 9.2.0.6

Test Sequence:

1 Run whole database backup with RMAN (ARCHIVELOG)

2 Identify a table segment, block to corrupt: =09
SQL> select file_id,block_id,tablespace_name from dba_extents where = segment_name =3D 'STATUS';

   FILE_ID BLOCK_ID TABLESPACE_NAME

---------- ---------- ------------------------------
        12        265 REACTOR5_1

SQL> select file#,name from v$Datafile where file#=3D12;

     FILE# NAME

---------- ---------------------------------------------------
        12	/PERF/agentdb/oradata/PERF/REACTOR5_1.dbf

3 Overwrite identified block

./corrupt.ksh /PERF/agentdb/oradata/PERF/REACTOR5_1.dbf 265 0+1 records in
0+1 records out

more corrupt.ksh

#!/usr/bin/ksh

FILE=3D${1:?'Parameter 1 should be set to file name'} BLOCK=3D${2:?'Parameter 2 should be set to the block to be corrupted'}

dd of=3D$FILE bs=3D8192 conv=3Dnotrunc oseek=3D$BLOCK << EOF CORRUPT_by_intent
EOF 4 Shutdown immediate, then startup

5 Run select on the corrupted segment:

SQL> select count(*) from reactor5.status;

  COUNT(*)


        44

6 "Backup validate" affected tablespace with RMAN:

RMAN> backup validate check logical tablespace REACTOR5_1;

Starting backup at 04-APR-2005 10:31:13
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset input datafile fno=3D00012 =
name=3D/PERF/agentdb/oradata/PERF/REACTOR5_1.dbf channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 Finished backup at 04-APR-2005 10:31:15

RMAN>=20 7 Check v$database_block_corruption view:

SQL> select * from v$database_block_corruption;

     FILE# BLOCK# BLOCKS CORRUPTION_CHANGE# CORRUPTIO

---------- ---------- ---------- ------------------ ---------
        12        265          1                  0 FRACTURED

QUESTION:=20 Why doesn't RMAN identify block corruption with "backup validate" while still registering block corruption in v$database_block_corruption?

Cheers,

Slava Zayarny
Oracle DBA
SAS Institute Inc

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Apr 04 2005 - 11:01:29 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US