n number;
begin
for cursor_lob in (select rowid r,JSON_DATA from LUNA_MCS_CQERTONG.MCS_CA_AUTHENTICATE_202412) loop
begin
n:=dbms_lob.instr(cursor_lob.JSON_DATA,hextoraw('889911'));
exception
when error_1555 then
insert into corrupt_lobs values (cursor_lob.r, 1555);
commit;
when error_25027 then
insert into corrupt_lobs values (cursor_lob.r, 25027);
commit;
end;
end loop;
end;
查询临时表
select * from corrupt_lobs
将坏块置空
update LUNA_MCS_CQERTONG.MCS_CA_AUTHENTICATE_202412 set JSON_DATA=empty_clob()
where rowid in (select corrupt_rowid from corrupt_lobs)
检查索引状态并重建索引
select index_name,status from dba_indexes where table_name='MCS_CA_AUTHENTICATE_202412'