Get the App
SLTechnology News&Howtos  ›  Database  › 

Oracle ora-01578 ORACLE block corruption (file number 4, block number 840339)

Shulou Source: shulou.com Published: 2022-06-01 08:38:44 10月01日 Update

ORA-01578 is a kind of physical bad block / corruption of data block. Unlike logical bad / bad block, it usually occurs with ORA-1110. Once ORACLE reads a damaged block, it will report Caused by: java.sql.SQLException: ORA-01578: ORACLE data block corruption (file number 4, block number 840339).

ORA-01110: data file 4:'e:\ APP\ ADMINISTRATOR\ ORADATA\ ORCL\ USERS01.DBF'

The solution is as follows:

1. Check the data file using DBV, enter dbv file='E:\ APP\ ADMINISTRATOR\ ORADATA\ ORCL\ USERS01.DBF' blocksize=8192; directly in the cmd directory, and then wait for the test result.

2. Check the tables related to damage

SELECT tablespace_name, segment_type, owner, segment_name FROM dba_extents WHERE file_id = 4 and 840339 between block_id AND block_id + blocks-1

Found the relevant table name

3. Internal event, set to skip corrupted data blocks during a full table scan: ALTER SYSTEM SET EVENTS='10231 trace name context forever,level 10'

4. Export exp test/test file=t.dmp tables=t with no corrupted data in the relevant tables above.

5. Delete the table drop table t related to corruption

Then import the data into imp test/test file=t.dmp tables=t

Tags: Data files checks above events methods physics directories results logic will report detect input Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Redmi Linux MariaDB Docker