Oracle dmp文件损坏恢复案例(2)

E:\>exp dbmon/dbmon file=e:\test\test.dmp tables=dh_sql,dh_stat
 
Export: Release 11.2.0.1.0 - Production on 星期二 6月 17 10:45:22 2014
 
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
 
连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
 
With the Partitioning, OLAP, Data Mining and Real Application Testing options
 
已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集
 
即将导出指定的表通过常规路径...
 
. . 正在导出表                          DH_SQL导出了      62613 行
 
. . 正在导出表                        DH_STAT导出了      72612 行
 
成功终止导出, 没有出现警告。
 

(2)破坏dmp文件(各种工具,dd,ue都可以),并尝试imp导入,确保文件已经损坏,如下:
 

E:\>imp dbmon/dbmon file=e:\test\test.dmp fromuser=dbmon touser=dh
 
Import: Release 11.2.0.1.0 - Production on 星期二 6月 17 10:48:57 2014
 
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
 
连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
 
With the Partitioning, OLAP, Data Mining and Real Application Testing options
 
经由常规路径由 EXPORT:V11.02.00 创建的导出文件
 
已经完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的导入
 
. 正在将 DBMON 的对象导入到 DH
 
. . 正在导入表                        "DH_SQL"
 
 illegal lob length marker 49920
 
 bytesread = 00000000000
 
 TABLE = DH_SQL
 
IMP-00098: INTERNAL ERROR: impgst2
 
IMP-00008: 导出文件中出现无法识别的语句:
 
IMP-00008: 导出文件中出现无法识别的语句:
 
IMP-00008: 导出文件中出现无法识别的语句:
 
IMP-00008: 导出文件中出现无法识别的语句:
 
IMP-00008: 导出文件中出现无法识别的语句:
 
...省略后续部分.......
 

(3)使用工具抽取dmp文件中的表结构,如下
 

DUL>  scan dump file e:\test\test.dmp;
 
0: CSET: 852 (ZHS16GBK)
 
3: SEAL EXPORT:V11.02.00
 
20: USER DBMON
 
28: TYPE TABLES
 
2317: TABLE "DH_SQL"
 
2332: CREATE TABLE "DH_SQL" ("ID" NUMBER, "NAME" VARCHAR2(128), "TYPE" VARCHAR2(19))  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 41
 
94304 NEXT 1048576 MINEXTENTS 1 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "USERS" LOGGING NOCOMPRESS
 
2597: INSERT INTO "DH_SQL" ("ID", "NAME", "TYPE") VALUES (:1, :2, :3)
 
2661: BIND information for 3 columns
 
 col[  1] type 2 max length 22
 
 col[  2] type 1 max length 128 cset 852 (ZHS16GBK) form 1
 
 col[  3] type 1 max length 19 cset 852 (ZHS16GBK) form 1
 
Conventional export
 
2687: start of table data
 
2781632: TABLE "DH_STAT"
 
2781648: CREATE TABLE "DH_STAT" ("ID" NUMBER, "NAME" VARCHAR2(128), "TYPE" VARCHAR2(19))  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIA
 
L 4194304 NEXT 1048576 MINEXTENTS 1 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "USERS" LOGGING NOCOMPRESS
 
2781914: INSERT INTO "DH_STAT" ("ID", "NAME", "TYPE") VALUES (:1, :2, :3)
 
2781979: BIND information for 3 columns
 
 col[  1] type 2 max length 22
 
 col[  2] type 1 max length 128 cset 852 (ZHS16GBK) form 1
 
 col[  3] type 1 max length 19 cset 852 (ZHS16GBK) form 1
 
Conventional export
 
2782005: start of table data
 
5898003: CREATE INDEX "IND111" ON "DH_STAT" ("NAME" )  PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 3145728 NEXT 1048576 MINEXTENTS 1 FREELISTS
 
1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "USERS" LOGGING
 
5898339: CREATE INDEX "IND_2" ON "DH_STAT" ("NAME" , "ID" )  PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 4194304 NEXT 1048576 MINEXTENTS 1 FREE
 
LISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "USERS" LOGGING
 
5900617: TABLE "DH_STAT"
 
5900705: ENDTABLE
 
5900740: EXIT
 
5900745: EXIT

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/c610cd199947f8a52015c925ce8fcc29.html