DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: v$database_block_corruption

  1. #1
    Join Date
    Jun 2002
    Location
    Longmont, Colorado
    Posts
    174

    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.

    Can someone explain this?

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Let me clarify it a little for you...

    "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.

    Hope it helps
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    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.

  3. #3
    Join Date
    Jun 2002
    Location
    Longmont, Colorado
    Posts
    174
    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.

    This is my question at hand....

  4. #4
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    when you do a cold backup - the database is down - so how can the database check itself?

    rman will do block checking when it backs up the database

  5. #5
    Join Date
    Jun 2002
    Location
    Longmont, Colorado
    Posts
    174
    Quote Originally Posted by davey23uk
    when you do a cold backup - the database is down - so how can the database check itself?
    I don't know... that's why I'm asking. All the document says is after each backup. Like I said, Oracle might check blocks at startup (though not likely). And what about hot backups???

    Quote Originally Posted by davey23uk
    rman will do block checking when it backs up the database
    If RMAN is the backup type this referencem is referring to, then why doesn't Oracle say that in the reference. This is what's confusing and frustrating.

    uuuurghhhhh!

  6. #6
    Join Date
    Nov 2006
    Location
    Sofia
    Posts
    630
    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

  7. #7
    Join Date
    Jun 2002
    Location
    Longmont, Colorado
    Posts
    174
    Thanks Bore...

    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:

    Quote 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width