select dmbs_rowid.rowid_create(1,<data_object_id>,<RFN>,<BL>,0) low_rid from dual;
select dmbs_rowid.rowid_create(1,<data_object_id>,<RFN>,<BL>+1,0) low_rid from dual;
--cts
create table tt_temp as select /*+ ROWID(A)*/ * from owner.tablename a where rowid <
'<low_rid>';
create table tt_temp as select /*+ ROWID(A)*/ * from owner.tablename a where rowid >= '<high_rid>';
--檢查壞塊是否處于表段頭,如果extent_id 等于0,表示段頭
select file_id,block_id,blocks,extent_id from dba_extents where owner='' and segment_name='' and segment_type='TABLE' order by extent_id;
--非空,從索引搶救數據 Fast Full Scan 訪問方式
select /*+ index_ffs (x <index_name>) */ index_col1,index_col2 from tablename x where rowid >= 'low_rid' and row <'hi_rid';
--有空值,從索引搶救數據 Range Scan 訪問方式
select /*+ index_ffs (x <index_name>) */ index_col1,index_col2 from tablename x where rowid >= 'low_rid' and row <'hi_rid' and index_col1 >= <min_col1_value>;;
--對象所占用的塊
select distinct dbms_rowid.rowid_relative_fno(rowid),dbms_rowid.rowid_block_number(rowid) from BOOTSTRAP$;
UNDO壞塊
--跳過
alter system set "_corrupted_rollback_segments"=(r1,r2,r3) scope=spfile;
--設置offline
alter system set "_offline_rollback_segments"=() scope=spfile;