SQL*Plus: Release 9.2.0.4.0 - Production on 星期一 3月 8 20:27:15 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
连接到: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.4.0 - Production
SQL> select name from v$datafile;
NAME -------------------------------------------------------------------------------- E:ORACLEORADATAEYGLESYSTEM01.DBF E:ORACLEORADATAEYGLEUNDOTBS01.DBF E:ORACLEORADATAEYGLEEYGLE01.DBF
DBVERIFY: Release 9.2.0.4.0 - Production on 星期一 3月 8 20:48:50 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
DBVERIFY - 验证正在开始 : FILE = block.dbf 标记为损坏的页35 *** Corrupt block relative dba: 0x01000023 (file 4, block 35) Bad check value found during dbv: Data in bad block - type: 6 format: 2 rdba: 0x01000023 last change scn: 0x0000.00049097 seq: 0x1 flg: 0x06 consistency value in tail: 0x90970601 check value in block header: 0xd6cb, computed block checksum: 0x2c0a spare1: 0x0, spare2: 0x0, spare3: 0x0 ***
标记为损坏的页69 *** Corrupt block relative dba: 0x01000045 (file 4, block 69) Bad check value found during dbv: Data in bad block - type: 6 format: 2 rdba: 0x01000045 last change scn: 0x0000.00049097 seq: 0x1 flg: 0x06 consistency value in tail: 0x90970601 check value in block header: 0x33d1, computed block checksum: 0x653 spare1: 0x0, spare2: 0x0, spare3: 0x0 ***
Export: Release 9.2.0.4.0 - Production on 星期一 3月 8 20:54:15 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
连接到: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.4.0 - Production 已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集
SQL> SELECT tablespace_name, segment_type, owner, segment_name 2 FROM dba_extents 3 WHERE file_id = 4 4 and 35 between block_id AND block_id + blocks - 1 5 ;
TABLESPACE_NAME SEGMENT_TYPE OWNER SEGMENT_NAME --------------------------------------------------------------------------- BLOCK TABLE EYGLE T
如果损失的是数据,ok 我们可以设置内部事件,使exp跳过这些损坏的block
SQL> ALTER SYSTEM SET EVENTS='10231 trace name context forever,level 10';
系统已更改。
note:
ALTER SYSTEM SET EVENTS='10231 trace name context forever,level 10' ;
内部事件,设置在全表扫描时跳过损坏的数据块.
然后我们可以导出未损坏的数据
SQL> host Microsoft Windows XP [版本 5.1.2600] (C) 版权所有 1985-2001 Microsoft Corp.
E:
E:>exp eygle/eygle file=t.dmp tables=t
Export: Release 9.2.0.4.0 - Production on 星期一 3月 8 20:57:13 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
连接到: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.4.0 - Production 已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集
即将导出指定的表通过常规路径 ... . . 正在导出表 T 8036 行被导出 在没有警告的情况下成功终止导出。
这时候数据成功导出. 然后我们可以drop table,recreate,然后导入数据
本例中 我们损失了
8192 - 8036 = 156 行数据
SQL> connect eygle/eygle 已连接。 SQL> drop table t;
表已丢弃。
SQL> host Microsoft Windows XP [版本 5.1.2600] (C) 版权所有 1985-2001 Microsoft Corp.
E:Oracleora92in>cd
E:>imp eygle/eygle file=t.dmp tables=t
Import: Release 9.2.0.4.0 - Production on 星期一 3月 8 21:12:38 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
连接到: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.4.0 - Production