在oracle中导入.dmp文件时出错。

时间:2011-07-28 18:05:37

标签: oracle10g

我正在尝试使用impdp命令导入.dmp文件。每当我尝试时,我都会得到以下错误日志:

Import: Release 10.2.0.1.0 - Production on Wednesday, 27 July, 2011 19:22:18

Copyright (c) 2003, 2005, Oracle. All rights reserved.
;;;
Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_01": system/******** DUMPFILE=HIST_IR_APR_2011.dmp
Processing object type TABLE_EXPORT/TABLE/TABLE
ORA-39083: Object type TABLE failed to create with error:
ORA-00439: feature not enabled: Partitioning
Failing sql is:
CREATE TABLE "DBO"."HIST_IR" ("IR_ID" NUMBER(9,0), "ELS_ID1" NUMBER(9,0), "ELS_ID2" NUMBER(9,0), "ZONE_ID" NUMBER(2,0) NOT NULL ENABLE, "TYPE" NUMBER(2,0) NOT NULL ENABLE, "START_TIME" DATE NOT NULL ENABLE, "END_TIME" DATE NOT NULL ENABLE, "ROAD_NAME" VARCHAR2(50) NOT NULL ENABLE, "UP_POINT" NUMBER(4,2), "DN_POINT" NUMBER(4,2), "UP_LINK_ID" NUMBER(9,0) NOT NULL ENABLE, "DN_LINK_ID" NUMBER
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
ORA-39112: Dependent object type OBJECT_GRANT:"DBO" skipped, base object type TABLE:"DBO"."HIST_IR" creation failed
ORA-39112: Dependent object type OBJECT_GRANT:"DBO" skipped, base object type TABLE:"DBO"."HIST_IR" creation failed
ORA-39112: Dependent object type OBJECT_GRANT:"DBO" skipped, base object type TABLE:"DBO"."HIST_IR" creation failed
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
ORA-39112: Dependent object type INDEX:"DBO"."INDX_HIST_IR_LOC_TYPE" skipped, base object type TABLE:"DBO"."HIST_IR" creation failed
ORA-39112: Dependent object type INDEX:"DBO"."INDX_HIST_IR_ROAD_NAME" skipped, base object type TABLE:"DBO"."HIST_IR" creation failed
ORA-39112: Dependent object type INDEX:"DBO"."INDX_HIST_IR_ELS_ID1" skipped, base object type TABLE:"DBO"."HIST_IR" creation failed
ORA-39112: Dependent object type INDEX:"DBO"."PK_HIST_IR" skipped, base object type TABLE:"DBO"."HIST_IR" creation failed
ORA-39112: Dependent object type INDEX:"DBO"."INDX_HIST_IR_START_TIME" skipped, base object type TABLE:"DBO"."HIST_IR" creation failed
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
ORA-39112: Dependent object type CONSTRAINT:"DBO"."PK_HIST_IR" skipped, base object type TABLE:"DBO"."HIST_IR" creation failed
Job "SYSTEM"."SYS_IMPORT_FULL_01" completed with 10 error(s) at 19:22:21

知道如何摆脱错误吗?

此外,我是否可以使用Oracle Developer 6.0处理此.dmp文件,而无需先通过上述步骤导入该文件?

1 个答案:

答案 0 :(得分:1)

源数据库似乎启用了分区选项并创建了分区表。另一方面,目标数据库没有分区选项。

您是否获得使用目标数据库上的分区选项的许可?这是企业版许可证之上的额外成本选项。如果您被许可使用它,则需要在导入之前安装该选项。

如果您未获得使用分区选项的许可,您希望分区表发生什么?是否要在目标数据库中创建非分区表并加载所有数据?您希望如何处理分区表上的任何本地索引?

在后一种情况下,一个选项是最初使用指定的INDEXFILE选项运行导入。这将把表和创建索引的DDL写入文本文件。您可以进入此文本文件,获取分区表和索引的DDL,修改DDL以删除分区选项并将分区键添加到任何本地索引,并针对目标数据库运行新的DDL。然后,您可以使用IGNORE=Y选项再次导入以忽略创建错误,因为您已手动创建分区表。这会将所有数据导入非分区表。您可能仍然在引用该表的任何代码中都有错误并期望对其进行分区,如果遇到此表的查询需要对其进行分区,则可能会出现性能问题。