How to fix block corruption of tables in the oracle database
HTML-код
- Опубликовано: 21 авг 2024
- #oracle #oracledba #oracledatabase #sql #database
#database
#How to fix block corruption of tables in the oracle database
#How to fix block corruption of table in oracle database
#how to resolve block corruption of table in oracle database
#Repair block corruption in an Oracle database
#How to check block corruption in Oracle database and fix it
#how to fix block corruption on object level
Hi All,
#how to reduce block corruption in oracle database
query to check block corruption on database
Welcome to my channel, Here I am making video related to Oracle database skills on the basic of my own personal IT experience. I have 8 years of experience in multiple MNC companies as Oracle Database Administrator.
Please watch my video I am going to share all importance information related to Oracle and other databases and
providing complete playlist on oracle database and going to cover full course training on oracle database on RUclips.
I am Oracle DBA Resource with 8 years of experience in IT industry.
If you find my content useful then Please like & subscribe my channel.
@TechDBA_Futue
My LinkedIn Profile: / saurabh-mishra-a31326a7
My Facebook Profile: www.facebook.c...
Thanks For giving Your Valuable time.
Regards,
Saurabh
really helpful
its good solution
Thanks
thanks, it worked for me
Thanks
good solution
Thanks
Share the query
Sure
Posting the sql query here for block corruption check
SELECT e.owner, e.segment_type, e.segment_name SG_Name, e.partition_name, c.file#
, greatest(e.block_id, c.block#) corr_start_block#
, least(e.block_id+e.blocks-1, c.block#+c.blocks-1) corr_end_block#
, least(e.block_id+e.blocks-1, c.block#+c.blocks-1)
- greatest(e.block_id, c.block#) + 1 blocks_corrupted
, null description
FROM dba_extents e, v$database_block_corruption c
WHERE e.file_id = c.file#
AND e.block_id = c.block#
UNION
SELECT s.owner, s.segment_type, s.segment_name, s.partition_name, c.file#
, header_block corr_start_block#
, header_block corr_end_block#
, 1 blocks_corrupted
, 'Segment Header' description
FROM dba_segments s, v$database_block_corruption c
WHERE s.header_file = c.file#
AND s.header_block between c.block# and c.block# + c.blocks - 1
UNION
SELECT null owner, null segment_type, null segment_name, null partition_name, c.file#
, greatest(f.block_id, c.block#) corr_start_block#
, least(f.block_id+f.blocks-1, c.block#+c.blocks-1) corr_end_block#
, least(f.block_id+f.blocks-1, c.block#+c.blocks-1)
- greatest(f.block_id, c.block#) + 1 blocks_corrupted
, 'Free Block' description
FROM dba_free_space f, v$database_block_corruption c
WHERE f.file_id = c.file#
AND f.block_id = c.block#
ORDER BY file#, corr_start_block#;