My Oracle Support Banner

DataPump Import Of XMLTYPE Fails With Errors ORA-31693 ORA-29913 ORA-31011 ORA-19202 LPX-217 Invalid Character (Doc ID 1391688.1)

Last updated on MARCH 04, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.2 to 11.2.0.3 [Release 11.2]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Information in this document applies to any platform.

NOTE: In the images and/or the document content below, the user information and data used represents fictitious data. Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner.

Symptoms

In 10gR2, in a table with an XMLTYPE column you inserted valid specific characters (conform the database character set). Then imported this table into 11.2.0.2. If now you export this table using expdp version 11.2.0.2 and import it, then you will see the errors:

ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00217: invalid character 8221 (U+201D)


like demonstrated below:

-- in 10gR2 with charset WE8MSWIN1252
connect / as sysdba

create or replace directory tmp as '/tmp';

create user test identified by test default tablespace users temporary tablespace temp;
grant connect, resource to test;

connect test/test

create table test_xmltype (id number, text sys.xmltype);

insert into test_xmltype values (1, '<A_TAG>Simple text</A_TAG>');
insert into test_xmltype values (2, '<B_TAG>Text with 0x201D: |&#x201D;|</B_TAG>');
commit;

host expdp system/password directory=tmp dumpfile=test_xmltype.dmp tables=test.test_xmltype

-- in 11.2.0.2 with charset WE8MSWIN1252
host impdp system/password directory=tmp dumpfile=test_xmltype.dmp full=y

-- export again using expdp 11.2.0.2
connect / as sysdba

create or replace directory tmp as '/tmp';

host expdp system/password directory=tmp dumpfile=test_xmltype_11202.dmp tables=test.test_xmltype

-- import the table back from the new dump
host impdp system/password directory=tmp dumpfile=test_xmltype_11202.dmp full=y table_exists_action=replace


This will show:

...
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
ORA-31693: Table data object "TEST"."TEST_XMLTYPE" failed to load/unload and
is being skipped due to error:
ORA-29913: error in executing ODCIEXTTABLEFETCH callout
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00217: invalid character 8221 (U+201D)

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.