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

Physical(media corrupt) and Logical(software corrupt) Block Corruption:

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:

RMAN> blockrecover corruption list;

# (all blocks from v$database_block_corruption)
Starting blockrecover at 05-04-2006:10:09:15
using channel ORA_DISK_1
channel ORA_DISK_1: restoring block(s) from datafile copy /u01/app/
oracle/flash_recovery_area/ORCL/datafile/o1_mf_example_236tmb1c_.dbf
starting media recovery
archive log thread 1 sequence 2 is already on disk as file /u01/app/oracle/
flash_recovery_area/ORCL/archivelog/2006_04_05/o1_mf_1_2_236wxbsp_.arc
archive log thread 1 sequence 1 is already on disk as file
/u01/app/oracle/oradata/
orcl/redo01.log
media recovery complete, elapsed time: 00:00:01
Finished blockrecover at 05-04-2006:10:09:24


40 comments:

Anonymous said...

I was suggested this website by my cousin. I'm not sure whether this post is written by him as no one else know such detailed about my trouble. You're wonderful!

Thanks!
Here is my website : naked girls

Anonymous said...

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

Anonymous said...

Malaysia & Singapore & brunei greatest online blogshop for
wholesale & supply korean accessories, earrings, earstuds, choker, rings, bangle, bracelet
& hair add-ons. Offer 35 % wholesale rebate. Ship Worldwide
My web site - iTunes promotion

Anonymous said...

It's an remarkable article designed for all the internet people; they will take benefit from it I am sure.
Review my weblog - www.illinoisskillsmatch.com

Anonymous said...

If you are going for most excellent contents like I
do, just go to see this web site all the time as
it gives feature contents, thanks
Look into my web site - Cheap YouTube Views

Anonymous said...

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.


Here is my weblog ... buy cheap gw2 gold

Anonymous said...

This is really interesting, You're a very skilled blogger. I've joined your feed and look forward
to seeking more of your excellent post. Also, I've shared your site in my social networks!

my blog post mzansi

Anonymous said...

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.

Also visit my web blog :: Clean Serv carpet cleaning

Anonymous said...

I love looking through a post that can make people think.
Also, thanks for allowing me to comment!

Feel free to visit my web page ... password crack

Anonymous said...

This piece of writing offers clear idea in favor of the new people of blogging, that truly
how to do running a blog.

Here is my web page :: manga games

Anonymous said...

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.

My blog post: xxx teens

Anonymous said...

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.

Feel free to surf to my web site www.cuteteenporn.net

Anonymous said...

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.

my page cuteteenporn.net

Anonymous said...

I simply could not depart your website prior to suggesting that I actually loved the standard
info an individual supply on your guests? Is going to be again steadily in order to check out new posts.


Here is my weblog - how to hack twitter

Anonymous said...

Pretty! This was an incredibly wonderful article. Many thanks for providing these details.


My page :: sexy games

Anonymous said...

Tremendous issues here. I am very glad to see your article.
Thank you so much and I am having a look forward to contact you.
Will you please drop me a mail?

Feel free to visit my web blog: aim bot

Anonymous said...

Hey There. I found your weblog the use of msn. This is
a really well written article. I will make sure to bookmark it and return
to learn extra of your helpful information. Thanks for the post.

I'll definitely comeback.

Feel free to surf to my homepage ... analteenexam.org

Anonymous said...

Hello! Would you mind if I share your blog with
my facebook group? There's a lot of folks that I think would really enjoy your content. Please let me know. Thanks

Here is my weblog; anal4firsttime.org

Anonymous said...

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!

my blog post :: Voyeur videos

Anonymous said...

My brother suggested I would possibly like this website.
He was entirely right. This put up actually made my day.

You can not believe just how much time I had spent for this
info! Thank you!

my web-site girlmovies.net

Anonymous said...

Now I am ready to do my breakfast, later than having my breakfast coming again to read
more news.

Feel free to surf to my web blog http://www.porn-selection.com/videos/blonde-and-tattooed-emo-babe-strips-and-masturbates-on-her-bed-185703.html

Anonymous said...

Hello i am kavin, its my first time to commenting anywhere,
when i read this paragraph i thought i could also make
comment due to this good article.

My weblog ... blowjobrules.com

Anonymous said...

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.

Feel free to visit my blog; free sex porn moives

Anonymous said...

Hey there! I've been following your weblog for a long time now and finally got the bravery to go ahead and give you a shout out from Austin Texas! Just wanted to mention keep up the fantastic work!

Here is my site - www.teenpornpost.com

Anonymous said...

Hello There. I found your weblog the usage of msn.

That is a very neatly written article. I will be sure to bookmark it and return to learn
extra of your helpful info. Thank you for the post. I'll certainly comeback.

Feel free to surf to my web site www.cfnmfever.net

Anonymous said...

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

my website Live girls

Anonymous said...

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.

Feel free to visit my web-site :: free minecraft download

Anonymous said...

I want to to thank you for this good read!! I absolutely enjoyed every bit of it.
I have got you bookmarked to look at new stuff
you post…

Feel free to surf to my site ... samsung galaxys4

Anonymous said...

This article gives clear idea for the new viewers of blogging, that actually how to do running a blog.


My site; how to buy more followers on twitter 2012

Anonymous said...

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.tk
Having 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.

Download ShareCash, FileIce, Upladee Survey Bypass Now!
http://sharecashdownloader2013.tk
Working Fileice Survey Bypass Download it here http:
//sharecashdownloader2013.tk

Anonymous said...

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!

My blog post :: xxxvideofix - http://www.tube8.su/blog/7786 -

Zheng junxai5 said...

zhengjx20160428
coach factory outlet
nfl jerseys
true religion jeans
oakley outlet
insanity workout
louis vuitton outlet
kate spade outlet
louis vuitton purses
michael kors outlet
cheap toms
true religion jeans
ray bans
fitflop shoes
louboutin shoes
cheap air jordans
nike air force 1 white
nike air max
nike uk
louis vuitton purses
nike store
oakley sunglasses
ray bans
burberry outlet
montblanc pens
michael kors outlet clearance
lebron 13
adidas originals store
nike outlet
michael kors handbags
ray ban outlet
michael kors outlet clearance
coach outlet store online
louis vuitton bags
michael kors purses
michael kors canada outlet
cheap louis vuitton handbags
cheap toms shoes
coach outlet
ralph lauren

oakleyses said...

cheap oakley sunglasses, nike air max, jordan shoes, polo outlet, longchamp outlet, louis vuitton, ray ban sunglasses, tory burch outlet, longchamp pas cher, oakley sunglasses, replica watches, longchamp outlet, nike free run, louis vuitton outlet, nike air max, polo ralph lauren, christian louboutin outlet, nike outlet, oakley sunglasses, burberry pas cher, oakley sunglasses, tiffany jewelry, louis vuitton, prada outlet, replica watches, ray ban sunglasses, jordan pas cher, sac longchamp pas cher, chanel handbags, tiffany and co, ugg boots, oakley sunglasses wholesale, longchamp outlet, uggs on sale, polo ralph lauren outlet online, christian louboutin uk, michael kors pas cher, gucci handbags, christian louboutin, christian louboutin shoes, prada handbags, nike roshe, nike free, air max, kate spade outlet, ray ban sunglasses, ugg boots, louboutin pas cher

oakleyses said...

michael kors outlet, hollister pas cher, ralph lauren uk, michael kors, north face uk, coach outlet store online, true religion outlet, mulberry uk, abercrombie and fitch uk, guess pas cher, true religion outlet, lululemon canada, ray ban pas cher, michael kors, uggs outlet, vans pas cher, nike free uk, michael kors outlet, michael kors outlet online, replica handbags, nike tn, michael kors outlet, oakley pas cher, burberry outlet, polo lacoste, nike air max uk, nike blazer pas cher, hollister uk, michael kors outlet online, sac hermes, uggs outlet, michael kors outlet online, burberry handbags, new balance, coach purses, true religion jeans, north face, kate spade, ray ban uk, michael kors outlet online, true religion outlet, nike air max, converse pas cher, nike air force, nike air max uk, nike roshe run uk, sac vanessa bruno

oakleyses said...

ghd hair, hollister clothing, ray ban, iphone cases, celine handbags, oakley, insanity workout, converse, abercrombie and fitch, instyler, gucci, lululemon, ferragamo shoes, baseball bats, nike huaraches, beats by dre, babyliss, louboutin, new balance shoes, mac cosmetics, hollister, herve leger, hermes belt, giuseppe zanotti outlet, timberland boots, vans, valentino shoes, nike trainers uk, asics running shoes, p90x workout, nfl jerseys, nike air max, vans outlet, reebok outlet, soccer shoes, north face outlet, soccer jerseys, converse outlet, longchamp uk, nike roshe run, wedding dresses, ralph lauren, hollister, bottega veneta, north face outlet, mont blanc pens, nike air max, jimmy choo outlet, mcm handbags, chi flat iron

oakleyses said...

canada goose outlet, canada goose, toms shoes, links of london, karen millen uk, doudoune moncler, pandora jewelry, louis vuitton, marc jacobs, montre pas cher, canada goose outlet, moncler uk, moncler, pandora charms, juicy couture outlet, louis vuitton, thomas sabo, replica watches, canada goose jackets, ugg uk, ugg, canada goose, ugg,uggs,uggs canada, louis vuitton, wedding dresses, juicy couture outlet, canada goose, swarovski, moncler, canada goose outlet, supra shoes, moncler outlet, lancel, coach outlet, canada goose uk, louis vuitton, moncler outlet, moncler, louis vuitton, swarovski crystal, ugg pas cher, barbour, pandora uk, barbour uk, ugg,ugg australia,ugg italia, moncler, hollister, pandora jewelry

Blogger said...

Trying to find the Best Dating Website? Create an account and find your perfect date.

sesli sohbet said...

Now I am ready to do my breakfast, later than having my breakfast coming again to read
more news.http://www.seslikaradeniz.com

raybanoutlet001 said...

gucci shoes
ugg outlet
ugg outlet
versace jeans
michael kors handbags
bills jerseys
coach factory outlet
true religion outlet
pandora outlet
polo ralph lauren

jeje said...

kyrie irving shoes
jordan 13
adidas outlet
air jordan 11
adidas nmd
jordan retro
longchamp handbags
lacoste online shop
birkin bag
adidas eqt support adv