Bajwa Consulting Need senior Oracle DBA help? Performance tuning, Cloud migrations, GoldenGate, backup and DR. Plus 70+ free DBA scripts.
Visit bajwaconsulting.com →

Friday, April 25, 2014

Check Database block corruption

Oracle database blocks can be marked as Corrupted by Oracle., in order to check if you have any corrupted blocks.


1. Run this rman script that will go through all database blocks and verify them.


RMAN target /

RMAN>
run {
# set disk to be default device type
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
# number of concurrent sessions to spawn
CONFIGURE DEVICE TYPE DISK PARALLELISM 10 BACKUP TYPE TO BACKUPSET;
# check datafiles for corruption 10 datafiles in each session
BACKUP VALIDATE CHECK LOGICAL DATABASE FILESPERSET=10;
}

2. Run this query to see if any of the database blocks were marked as corrupted.


select * from v$database_block_corruption;

No comments:

Post a Comment