impdp导入ORA-31693 ORA-38500

今天做导数的时候遇到这么个错误,怎么都导入不了!metlink上查了一下,居然是表结构不一致导致的。

下面是metlink的注释,11.2以后才出现。。

Oracle Server - Enterprise Edition - Version: 11.2.0.3 and later   [Release: 11.2 and later ]
Information in this document applies to any platform.

Goal

IMPDP is getting error:

ORA-31693: Table data object "SYSADM"."PS_ACAD_CAR_TBL" failed to load/unload and is being skipped due to error:
ORA-38500: Unsupported operation: Oracle XML DB not present

This table is a standard table and does not use XML DB. Why is the XML DB error reported?

 

Solution

You are correct the issue is generated when tables have differences.  Here in an example.

create table u1.t1
(
col1 char(1) not null,
col2 char(1),
constraint pk_t1 primary key (col1) using index
);
insert into t1 values('a','a');
commit;

expdp u1/u1 DUMPFILE=expdp.dmp LOGFILE=expdp.log tables=T1


drop table u1.t1;


create table u1.t1(
col1 char(1) not null,
newcol char(1),
col2 char(1),
constraint pk_t1 primary key (col1) using index
);

impdp u1/u1 DUMPFILE=expdp.dmp LOGFILE=impdp.log tables=T1 TABLE_EXISTS_ACTION=APPEND

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options
Master table "U1"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded
Starting "U1"."SYS_IMPORT_TABLE_01": u1/******** DUMPFILE=expdp.dmp LOGFILE=imp
dp.log tables=T1 TABLE_EXISTS_ACTION=APPEND
Processing object type TABLE_EXPORT/TABLE/TABLE
Table "U1"."T1" exists. Data will be appended to existing table but all dependent metadata will be skipped due to table_exists_action of append
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
ORA-31693: Table data object "U1"."T1" failed to load/unload and is being skipped due to error:
ORA-38500: Unsupported operation: Oracle XML DB not present
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Job "U1"."SYS_IMPORT_TABLE_01" completed with 1 error(s) at 11:43:55

This error is happening due to the metadata differences of the exported table in the dumpfile and the existing table at the target DB.

In general, whenever there is a difference between metadata of a table from a dumpfile and a pre-existing table at a target DB, IMPDP code tries to find the difference between the metadata of the table to find the correct metadata.  To find the metadata difference, we use a metadata diffing code which internally uses XDB features to differentiate metadata XML.

The bottom-line here is that the error message refers to XML DB code errors not based on the use of XML DB in the table having the problem, but due to internal XDB features inside Data Pump. 

In this error scenario compare the existing table metadata vs. the metadata captured in the EXPDP dumpfile.  There was a change in the metadata for the object after the dumpfile was created.


 记录一下,但这个报错不是很明显,觉得oracle可以将报错信息在明确一点。

呵呵!

你可能感兴趣的:(oracle)