My blog is all about sharing and learning oracle.Please test before you apply anything on production.You may reach to me at vishwanathsh82@gmail.com

Friday, February 3, 2012

RMAN BACKUP VALIDATION AND RECOVERY FROM BLOCK CORRUPTION:

The main purpose of RMAN validation is to check for corrupt blocks and missing files

Corruption in block:

Block corruption is while the data is being written to the data blocks, if the write to the block fails abruptly, I mean that there is a partial write in the block, may be because of power disruption or I/O problem, leaving no time for header to be updated, or row data to be populated, oracle leaves the block corrupt.In case of block corruption you can normally use the database unless you try to read that particular block, against which it shoots up the block corruption error.Generally block corruption occurs if write fails on the block, when the transaction is being committed

In a physical corruption, which is also called a media corruption, the database does not recognize the block at all: the checksum is invalid.

Checksum:

A number calculated by the database from all the bytes stored in a data or redo block. If the DB_BLOCK_CHECKSUM initialization parameter is enabled, then the database calculates the checksum for every datafile or online redo log block and stores it in the block header when writing to disk. The database can use the checksum value to check consistency.

In a logical corruption, the contents of the block are logically inconsistent.

The logical corruption happens within the blocks , for eg. some index entry pointing towards a null rowid.

Validating Database Files with BACKUP VALIDATE:

You can use the BACKUP VALIDATE command to do the following:

-Check datafiles for physical and logical block corruption.

-Confirm that all database files exist and are in the correct locations.

Validating only physical corruption:

BACKUP VALIDATE DATABASE ARCHIVELOG ALL;

Validating both physical and logical corruption:

BACKUP VALIDATE CHECK LOGICAL DATABASE ARCHIVELOG ALL;

Validating Backups Before Restoring Them:

You can run RESTORE ... VALIDATE to test whether RMAN can restore a specific file or set of files from a backup.

RESTORE DATABASE VALIDATE;

RESTORE ARCHIVELOG ALL VALIDATE;

RECOVRING A BLOCK CORRUPTION:

If it finds corrupted blocks(after checking with BACKUP VALIDATE CHECK LOGICAL DATABASE ARCHIVELOG ALL;) it will place the information about the corruption into a view:

v$database_block_corruption

SQL>select * from v$database_block_corruption;

FILE# BLOCK# BLOCKS CORRUPTION_CHANGE# CORRUPTIO

———- ———- ———- —————— ———

5 81 4 0 CORRUPT

this is what we find in the alert_.log:

Corrupt block relative dba: 0x014000b1 (file 5, block 177)

Bad header found during backing up datafile

Data in bad block:

type: 67 format: 7 rdba: 0x0a545055

last change scn: 0×0000.0007bc77 seq: 0×3 flg: 0×04

spare1: 0×52 spare2: 0×52 spare3: 0×0

consistency value in tail: 0xbc772003

check value in block header: 0xb32

computed block checksum: 0xe4c1

Reread of blocknum=177, file=/u01/app/oracle/oradata/orcl/

example01.dbf.

found same corrupt data

Now we can tell RMAN to recover all the blocks which it has found as being corrupt:

Hello there! I could have sworn I've been to your blog before but after browsing through some of the posts I realized it's new to me. Nonetheless, I'm definitely pleased I discovered it and I'll be book-marking it and checking back regularly!Also see my webpage - treadmill review

Do you have a spam issue on this website; I also am a blogger, and I was curious about your situation; many of us have developed some nice methods and we are looking to swap solutions with other folks, please shoot me an e-mail if interested.

Appreciating the dedication you put into your blog and detailed information you present.It's good to come across a blog every once in a while that isn't the same outdated rehashed information.Excellent read! I've bookmarked your site and I'm including your RSS feeds to my Google account.

Attractive section of content. I just stumbled upon your web site and in accession capital to assert that I acquire actually enjoyed account your blog posts. Anyway I will be subscribing to your augment and even I achievement you access consistently rapidly.

Hi, I do believe this is a great web site. I stumbledupon it ;) I'm going to revisit once again since i have saved as a favorite it. Money and freedom is the best way to change, may you be rich and continue to help other people.

Hmm it looks like your blog ate my first comment (it was super long) so I guess I'll just sum it up what I had written and say, I'm thoroughly enjoying your blog.I as well am an aspiring blog blogger but I'm still new to the whole thing. Do you have any tips for beginner blog writers? I'd really appreciate it.

Hey! I know this is kind of off-topic but I had to ask.Does running a well-established website such as yours take a large amount of work? I am completely new to operating a blog but I do write in my diary everyday. I'd like to start a blog so I can easily share my personal experience and thoughts online. Please let me know if you have any kind of suggestions or tips for brand new aspiring blog owners. Appreciate it!

Great goods from you, man. I have understand your stuff previous to and you're just extremely magnificent. I actually like what you have acquired here, really like what you are saying and the way in which you say it. You make it enjoyable and you still take care of to keep it wise. I can not wait to read much more from you. This is actually a great web site.

Whats up very nice website!! Man .. Excellent .. Amazing .. I will bookmark your website and take the feeds additionally? I am satisfied to search out numerous useful information here within the submit, we'd like work out more techniques on this regard, thanks for sharing. . . . . .

I believe what you published made a bunch of sense.But, consider this, what if you were to create a killer post title?I ain't suggesting your content isn't good, however what if you added a headline that grabbed people's attention? I mean "RMAN BACKUP VALIDATION AND RECOVERY FROM BLOCK CORRUPTION:" is a little plain. You ought to glance at Yahoo's home page and note how they create news titles to grab viewers interested.You might add a related video or a related pic or two to grab readers excited about what you've written. Just my opinion, it could bring your blog a little livelier.

Are you tiered of completing surveys only for them not to unlock your file?

Do you want to bypass all online survey sites?Here is the solution http://sharecashdownloader2013.tkHaving trouble downloading very important file from ShareCash, FileIce, Upladee or others due to no surveys showing up?Thanks to our newest tool, you will be able to download everything you want whenever you want!Works on all fileice surveys, with just one click of a button you will be able to start downloading the file, for free!

Also works on sharecash surveys. Clicking in the image above will take you to a video tutorial for this tool.To learn how to use Fileice Survey Bypass you can click here, you will be taken to a short tutorial on how to use the tool.

Hi there! Quick question that's completely off topic. Do you know how to make your site mobile friendly? My site looks weird when browsing from my iphone4. I'm trying to find a theme or plugin that might be able to fix this issue.If you have any suggestions, please share.Thanks!

TRANSLATE MY PAGE PLZ

Oracle database adminstrator

That's Me...

An oracle DBA and blogger having 6 + years of experience in Designing,Installation and Maintenance of oracle databases ranging from 9i,10g and 11g. Deployed and Tuned TB's databases successfully on various platforms such as Linux and Windows etc.