SELECT tablespace_name, segment_type, owner, segment_name, partition_name FROM dba_extents WHERE file_id = <AFN> and <BL> between block_id AND block_id + blocks – 1;
Rman>run{blockrecover datafile 5 block 11,16 restore until sequence 8505;}
Ø 通过ROWID RANGE SCAN 保存数据 1) 先取得坏块中ROW ID的最小值,执行以下的语句:
SELECT dbms_rowid.rowid_create(1,<OBJ_ID>,<RFN>,<BL>,0) from DUAL;
2)取得坏块中的ROW ID的最大值,执行以下的语句:
SELECT dbms_rowid.rowid_create(1,<OBJ_ID>,<RFN>,<BL>+1,0) from DUAL;
3)建议一个临时表存储那些没有坏块的数据,执行以下的语句:
CREATE TABLE salvage_table AS SELECT * FROM corrupt_tab Where 1=2;
4)保存那些不存在坏块的数据到临时表中,执行以下的语句:
INSERT INTO salvage_table SELECT /*+ ROWID(A) */ * FROM <owner.tablename> A WHERE rowid < '<low_rid>';INSERT INTO salvage_table SELECT /*+ ROWID(A) */ * FROM <owner.tablename> A WHERE rowid >= '<hi_rid>‘;