如何使用DBMS_REPAIR检测和修补数据坏块
2008-11-10 12:58:38 来源:WEB开发网Trace文件中主要的内容如下:
Dump file /export/home/oracle/product/8.1.5
/admin/V815/udump/v815_ora_2835.trc
Oracle8 Enterprise Edition Release 8.1.5.0.0
With the Partitioning option
*** 1998.12.16.15.53.02.000
*** SESSION ID:(7.6) 1998.12.16.15.53.02.000
kdbchk: row locked by non-existent transaction
table=0 slot=0
lockid=32 ktbbhitc=1
Block header dump: 0x01800003
Object id on Block? Y
seg/obj: 0xb6d csc: 0x00.1cf5f itc: 1 flg: - typ: 1 - DATA
fsl: 0 fnx: 0x0 ver: 0x01
Itl Xid Uba Flag Lck Scn/Fsc
0x01 xid: 0x0002.011.00000121 uba: 0x008018fb.0345.0d --U- 3 fsc
0x0000.0001cf60
data_block_dump
===============
tsiz: 0x7b8
hsiz: 0x18
pbl: 0x28088044
bdba: 0x01800003
flag=-----------
ntab=1
nrow=3
frre=-1
fsbo=0x18
fseo=0x19d
avsp=0x185
tosp=0x185
0xe:pti[0] nrow=3 offs=0
0x12:pri[0] offs=0x5ff
0x14:pri[1] offs=0x3a6
0x16:pri[2] offs=0x19d
block_row_dump:
(注:其余的省略)
end_of_block_dump
一、首先使用DBMS_REPAIR.ADMIN_TABLES来建立repair table和orphan key table,
并且为repair table和orphan key tables提供管理功能
SQL> @adminCreate
SQL> connect sys/
Connected.
SQL>
SQL> -- Repair Table
SQL>
SQL> declare
2 begin
3 -- create repair table
4 dbms_repair.admin_tables (
5 -- table_name => 'REPAIR_TABLE',
6 table_type => dbms_repair.repair_table,
7 action => dbms_repair.create_action,
8 tablespace => 'USERS'); -- 如果是使用SYS用户的缺省表空间,该项就不用指定
9 end;
10 /
PL/SQL procedure successfully completed.
更多精彩
赞助商链接