If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

v$database_block_corruption

Are any of you familiar with this view?
I was doing some research on how to detect data block corruption and found this in the Oracle documents.

The reference describes it this way:

...
V$DATABASE_BLOCK_CORRUPTION displays information about database blocks that were corrupted after the last backup.
...

But now I'm wondering about what exactly it means by “… after the last backup”. I wonder if Oracle does any internal checks of blocks when a backup is performed. I imagine it could be doing the check when you put a table in backup mode (during hot backups); or when an RMAN backup kicks off; or even when a database is shutdown for a cold backup. But I can’t be sure, though, and there reference in the document is not comprehensive.

"V$DATABASE_BLOCK_CORRUPTION displays information about database blocks that were corrupted after the last backup."

means...

V$DATABASE_BLOCK_CORRUPTION system view "displays information about database blocks that were corrupted after the last backup.", neither the next one nor the first one (or anyone in the middle), exactly, the last one.

Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Oh geeeshhhhh,
I guess I have to explain (spell out) what exactly I was asking for....

I'm not asking about what does "last" mean... for crying out load....

I'm asking...

Do anyone know what "mechanism" does Oracle use to check for corrupt data block that is inherent in a backup??? I'm asking this because of the document statement.. (again)

...
V$DATABASE_BLOCK_CORRUPTION displays information about database blocks that were corrupted after the last backup.
...

In order words, if all I do is cold backups, does that count and will Oracle detect corrupt data blocks when I do cold backups???

I wouldn't think so unless that "mechanism" is built in when I "gracefully" shutdown the database (as I would when I do a cold backup). Or better yet or more likely, when I startup the database (after a cold backup)... since v$ view are not persistent after a shutdown.

How about if all I do is hot backups??? Is that "mechanism" built-in when I put the tablespaces in backup mode???

Someone has said that this is only true if you're doing RMAN backups. They believe this make sense since "only" RMAN is what actually reads/tracks individual blocks. And therefore RMAN can be used to update this v$ view for corrupt block.

The view gets populated when u do RMAN backup I belive. While backing up the RMAN checks the blocks it backs up and populates these views (v$backup_corruption,v$copy_corruption,v$database_block_corruption. So I belive it's not abour "after the last backup" but better to say "during the last RMAN back up.
That's my understanding but just to be precise, I am not completely sure about that. Maybe U can search the metalink for more precise info

I did find something in Metalink that supports your suggestion and what another fellow said to me. But the same note also says you don't have to necessary be using RMAN as a backup solution to take advantage of this capability - you can simply use RMAN to check for corruption, which makes it cool for us who don't use RMAN for backups.

See Note 283053.1

Here's an excerpt of the note:

Originally Posted by Metalink_Note_283053.1

SCOPE & APPLICATION
-------------------
This document is intended for database adminstrators of all levels.

Note: No need that RMAN has been used or setup previously. There is no need for a recovery catalog. No backup is created. Since a single channel is being allocated there is little overhead. The only requirement is that Oracle8i or later has to be used and the database is mounted open.

During a RMAN backup or RMAN 'backup validate' every block currently used or previously used is read into memory then written to another portion of memory. During this memory to memory write the block is checked for corruption. Therefore RMAN's BACKUP command with the VALIDATE and CHECK LOGICAL clauses allow a Database Adminstrator to quickly check for both physical and logical corruption.