1. 执行sql:select count(distinct id) from bw_fpzxx ,报错如下:
ORA-01578: ORACLE 数据块损坏 (文件号 16, 块号 195428)
ORA-01110: 数据文件 16: ‘/disk01/hwxx09.dbf‘
01578. 00000 - "ORACLE data block corrupted (file # %s, block # %s)"
2.确认block_no 为195428的数据。
select id,rownum,rowid,dbms_rowid.rowid_relative_fno(rowid) rel_fno,dbms_rowid.rowid_block_number(rowid)
blockno from bw_fpzxx where dbms_rowid.rowid_relative_fno(rowid)=16 and
dbms_rowid.rowid_block_number(rowid)
=195428--rownum <8;
/*
1 1100623697598 1 AAASNhAAQAAAvtkAAL 16 195428
2 1100623690430 2 AAASNhAAQAAAvtkAAE 16 195428
3 1100623693502 3 AAASNhAAQAAAvtkAAH 16 195428
4 1100623687358 4 AAASNhAAQAAAvtkAAB 16 195428
5 1100623695550 5 AAASNhAAQAAAvtkAAJ 16 195428
6 1100623691454 6 AAASNhAAQAAAvtkAAF 16 195428
7 1100623698622 7 AAASNhAAQAAAvtkAAM 16 195428
8 1100623688382 8 AAASNhAAQAAAvtkAAC 16 195428
9 1100623694526 9 AAASNhAAQAAAvtkAAI 16 195428
10 1100623696574 10 AAASNhAAQAAAvtkAAK 16 195428
11 1100623692478 11 AAASNhAAQAAAvtkAAG 16 195428
12 1100623686334 12 AAASNhAAQAAAvtkAAA 16 195428
13 1100623689406 13 AAASNhAAQAAAvtkAAD 16 195428
*/
13条数据,把出错的数据块屏蔽了。
3.
alter system set event=‘10231 trace name context forever,level 10‘ scope=spfile;
4.再次执行sql
select count(distinct id) from bw_fpzxx;
147467803