Oracle ora-01578 ORACLE block corruption (file number 4, block number 840339)
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