Fix Corrupt Blocks: Block corruption In Oracle Database
Published by Jacob Martin on August 8, 2014
The common cause of Oracle database corruption is a bad disk, although there are very exceptional cases of logical corruption within the data blocks of oracle. Block corruption in oracle database can be rectified by applying the given steps. A command is provided by this database to find such types of error. Use Select * from v$database_block_corruption command and find the block corruption and more.
After getting the file number and block number you can execute the bellow given query to see the exact data block that goes damaged:
Select relative_fno, owner, segment_name, segment_type from dba_extents where file_id = 6 and 437 between block_id and block_id + blocks – 1;
Through this command you can get the exact block ID, use the block ID to view the damaged block contents with the block editor BBED tool.
Other Types of Oracle Database corruption
There are mainly two types of corruption in Oracle database physical and logical. There are many causes of database corruption such as power failure, stored data gets write failed, virus infection etc.
- Physical Corruption (Media Corruption)
- Logical Corruption (Soft Corruption)
Physical Corruption:
This type of corruption occurs due to the I/O Problems, Memory Failure, Server Controller. Concerning to Oracle documentation the damaging could be occurs by:
- Bad header: The start of the block i.e. cache header is crooked with invalid values.
- Block is broken/Incomplete: Information of Block header get mismatched with the block tail
- Block is misplaced
- Block checksum is invalid
Logical Corruption:
This type of corruption is not available in alertlog only by DBVerify tool, also be renowned if db_block_checking Parameter is permitted, it can create the internal error ORA-600 [kddummy_blkchk]
How to Know that a database is Damaged or Not
By using the bellow given method you can know that the oracle database is damaged or not.
1-RMAN 2-DBVerify
DBVerify :
It is an external command-line tool that executes a physical data structure integrity to verify on an offline database. This can be used against backup files and online files. DBVERIFY mainly used to verify that a backup database is valid or not (before it is restored). It is also used as an analytical aid when you have encountered data corruption scenario.
RMAN
RMAN is able to detect the both logical/physical corruption, verify the below given script that could check if the database is corrupted without still take backup:
RMAN> configure device type disk parallelism 4; RMAN> backup validate check logical database; OR RMAN> run { allocate channel diskl1 type disk; allocate channel disk2 type disk; allocate channel disk3 type disk; allocate channel disk4 type disk; backup validate check logical database;
}
Through the above given steps you can verify the database validation.
How to Restore a Corrupt Oracle Database without Backup file:
To do this you need a professional oracle database recovery tool, this type of recovery software makes you able to restore a damaged database even without having a proper or without backup. It is a safe method and one can easily apply it without need of any professional knowledge or typing any command. Simply download oracle recovery software and restore your database by clicking some buttons.
Steps to fix Block corruption In Oracle Database
Step 1: Search Initial screen of Stellar Phoenix Oracle Recovery with a pop-up window showing options to select or search corrupt Oracle databases in your computer.
Step 2: Click Scan File to initiate the scan process after selecting the oracle database. The recoverable database objects get listed in left-side pane.
Step 3: Click an object to see its preview.
Step 4: : Click Start Repair in the icon bar to start the repair process. A pop-up window is displayed which show the steps needed to perform further. Click next and continue.
Step 5: Give the user name, password and path of the blank database where you want to save the repaired database objects.
Step 6: Repairing and restoring various database objects after establishing a connection with blank oracle database.
1072 Total Views 4 Views Today