08103, 00000, “object no longer exists”
// *Cause: The object has been deleted byanother user since the operation
// began, or a prior incomplete recoveryrestored the database to
// a point in time during the deletion of theobject.
// *Action: Delete the object if this is theresult of an incomplete
// recovery.
从错误代码的官方解释可以看出,问题还是比较严重,查询资料得到更详细的解释如下:
Theheader block has an invalid block type or the block type inside the block is not expected. i.e. A data block (Type=6) was expected but theactual block information is not a datablock.
Or
Thedata_object_id (seg/obj) stored in the block is different than the data_object_id stored in the segment header
declare
nrows number;
badrows number;
id_in NUMBER(18);
begin
badrows:=0;
nrows:=0;
for i in (select /*+ index (门诊费用记录_PK) */ rowid,id from 门诊费用记录 tab1) loop
begin
insert into 门诊费用记录new select *
from 门诊费用记录where rowid=i.rowid;
if (mod(nrows,20000)=0) then commit;end if;
exception when others then
badrows:=badrows+1;
select /*+ index(门诊费用记录_PK) */ id into id_in from 门诊费用记录 a where rowid=i.rowid;
insert into bad_rows values(i.Rowid,id_in);
commit;
end;
nrows:=nrows+1;
end loop;
dbms_output.put_line('Total rows:'||to_char(nrows)||' Bad rows: '||to_char(badrows));
Commit;
end;
/