Regarding BLOCKS [message #161819] |
Tue, 07 March 2006 05:57 |
frank.svs
Messages: 162 Registered: February 2006
|
Senior Member |
|
|
Hi all,
I'm reading the oracle docs rman b&r concepts and I need some
clarification. What is the difference between a corrupted block and a fractured block.
Thanks and Regards.
|
|
|
Re: Regarding BLOCKS [message #161988 is a reply to message #161819] |
Wed, 08 March 2006 01:50 |
girish.rohini
Messages: 744 Registered: April 2005 Location: Delhi (India)
|
Senior Member |
|
|
Fractured Block:
[Source: http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:271815712711]
Oracle works with database blocks in 2, 4, 8, 16, or 32k pieces. Say 8k is what
you are using.
operating systems read and write files using their own chunk size. say 512bytes
(1/2 k) for example -- a common size.
So, you are copying a datafile -- you are using the OS to do that. You are
reading it in 512byte chunks.
You start reading block 55 in file 5 using "copy". You got 1/2 of the way
through it (meaning you read 4k of data). You get pre-empted and along comes
DBWR who decides to lay down a new version of that block on disk (checkpoint,
flush dirty buffers). DBWR was lucky enough to write all 8k. Your copy picks
back up and reads the next 4k of the block -- but -- it is 4k of the block at a
totally different point in time.
This is known as a fractured block -- happens easily on a system with many
people reading and writing the same file at the same time.
Corrupted Block:
Gor the following article on web for this:
[Source: http://www.dbaoncall.net/references/er_block_corruption.html]
Quote: | Error ORA-1578 - Block Corruption
By Alexander Geldutes
Oracle posts the following error when it detects inconsistencies in data read from the disk:
01578, 00000, "ORACLE data block corrupted (file # %s, block # %s)"
The error message contains the absolute file number (AFN) and the block number (BN). The following statement helps you to determine what objects where affected:
select owner, segment_name, segment_type, segment_name
from dba_extents
where file_id =
and between block_id and block_id + blocks - 1;
Basically, the type of the affected object will determine your recovery procedure. Note: the ultimate solution is to restore and recover the entire database.
Nevertheless, if the corrupted block belongs to the Data Dictionary object or to a rollback segment, contact Oracle Support Center.
Otherwise you may consider trying the following:
* Table - recover it from the latest export (if you have it).
* Index - if its base table is not corrupted, drop and recreate the index.
To prevent the unexpected occurance of this error you may use the following script: check_corruption.sql This script checks the entire database and should not return any errors. For example, it makes sense to use it before upgrading your database.
If you want to check only one particular object you may use the following command:
analyze table_name/index_name/cluster_name ... validate structure;
You may also consider using the DBVERIFY utility.
|
[Updated on: Wed, 08 March 2006 01:54] Report message to a moderator
|
|
|