Oracle – Data Block Corruption in oracle 10g – A quick view

PC & Tech Category

Data Block Corruption in oracle 10g - A quick view How can we find the corrupted object list?

One of my database, blocks are corrupted few months ago.
At that time i have written a dynamic script for each block id & find the corrupted block list.

Query in the article:

https://www.primeinspiration.com/programming/database/oracle/200-oracle-find-the-block-corruption-object-name-a-owner.html


Solutions:


1.If corruption occurred in temporary segments, kindly ignore the block corruption. (Block corruption in temporary segment, everyday block id will change)

2.Corrupted blocks in index segments Drop & recreate the index segment

3.Using DBMS_REPAIR to Repair Data Block Corruption fix_corrupt_blocks procedure

a.CHECK_OBJECT – Detects and reports corruptions in a table or index
b.FIX_CORRUPT_BLOCKS – Marks blocks (that were previously identified by the CHECK_OBJECT procedure) as software corrupt
c.DUMP_ORPHAN_KEYS – Reports index entries (into an orphan key table) that point to rows in corrupt data blocks
d.REBUILD_FREELISTS – Rebuilds the free lists of the object
e.SEGMENT_FIX_STATUS – Provides the capability to fix the corrupted state of a bitmap entry when segment space management is AUTO
f.SKIP_CORRUPT_BLOCKS – When used, ignores blocks marked corrupt during table and index scans. If not used, you get error ORA-1578 when encountering blocks marked corrupt.
g.ADMIN_TABLES – Provides administrative functions (create, drop, purge) for repair or orphan key tables.

Note: These tables are always created in the SYS schema.

4.Using RMAN backup block media recovery (oracle 10g database)

a.Select * from v$database_block_corruption; –> Return any rows follow below steps

BLOCKRECOVER DATAFILE 8 BLOCK 13 DATAFILE 2 BLOCK 19; –> Multi block corrupted
BLOCKRECOVER DATAFILE 8 BLOCK 13; –>Single block corrupted

b.backup validate datafile 8;
c.Select * from v$database_block_corruption; –> no rows returned

5.Using Physical Managed backup/Server Managed backup

a.Offline the particular datafile.
b.Restore the datafile from previous backup.(before ensure backup is valid)
c.Bring the datafile online.
d.Recover the datafile.

Note:
Scenario 5 applicable for oracle 9i/10g physical managed backup and 9i server managed backup. ( In 10g server managed backup we will go block media recovery)

6.Using Logical backup.

There is no backup strategy in our environment. Only we have logical backup.

1.Try to export the corrupted table. –> also failed
2.Create table temp_corrupted as select * from ; –> also failed
3.Drop the corrupted table & import the table from previous logical backup.( Data loss)

I Hope this article helped to you. Suggestions are welcome.

Tags:

Edward Ramamoorthy Avatar

Help Us Grow

If you like this post, please share it with your friends.

You are free to copy and redistribute this article in any medium or format, as long as you keep the links in the article or provide a link back to this page.

Subscribe to Newsletter




Privacy Settings

Privacy & Cookie Overview

Our website uses cookies to provide you with the best user experience possible. These cookies are stored in your browser and perform essential functions such as recognizing you when you return to our website, as well as helping us to understand which sections of the website you find most useful and engaging.

To learn more, you can read our Privacy & Cookie Policy or reach out through our Contact form.

Strictly Necessary Cookies

Strictly Necessary Cookies must always be enabled to ensure the proper functioning of this website and to allow us to provide you with excellent service. These cookies are also essential for saving your cookie preferences.

Google Adsense

We use Google AdSense to keep this site free by displaying relevant ads. AdSense requires essential cookies that cannot be disabled, but you can manage other cookies. We respect your privacy and provide options to control non-essential cookies.

For more details on how Google handles your data, visit Google's Data Usage Policy. Please review our Privacy Policy for more information on how we protect your data.

AddToAny

We use AddToAny for social sharing. It doesn’t store cookies, ensuring a privacy-friendly experience. AddToAny complies with GDPR and CCPA by default.

For more, see their Privacy Policy.

OneSignal

We use OneSignal to send notifications to users who opt in. OneSignal complies with GDPR and is certified under the EU-US and Swiss-US Privacy Shield frameworks.

For more, see their Privacy Policy.

3rd Party Cookies

This website utilizes third-party cookies, which can enhance your experience and support our ongoing efforts to improve our services.

Google Analytics

We use Google Analytics to collect anonymous data, such as visitor numbers and popular pages, to improve user experience and site performance. Keeping this cookie enabled helps us refine the site based on visitor activity.

For more information, see Google’s Privacy Policy.

Discover more from Prime Inspiration

Subscribe now to keep reading and get access to the full archive.

Continue reading