Loading Xml Instance Document When Whole Table Consists Of Single Xmltype Column (Doc ID 367403.1)

Last updated on FEBRUARY 08, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.1 and later
Information in this document applies to any platform.
Checked for Relevance on 13-Feb-2013


Symptoms

When trying to load a XML document with SQL*Loader, error messages are issued. All records are
rejected.

The SQL*Loader Log file
SQL*Loader: Release 10.2.0.2.0 - Production on Wed Apr 5 19:02:13 2006

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Control File: fk.ctl
Data File: fk.ctl
Bad File: fk.bad
Discard File: none specified

(Allow all discards)

Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array: 64 rows, maximum of 256000 bytes
Continuation: none specified
Path used: Conventional

Table KEYTABS, loaded from every logical record.
Insert option in effect for this table: TRUNCATE

Column Name Position Len Term Encl Datatype
------------------------------ ---------- ----- ---- ---- ---------------------
XMLDATA FIRST * , O(") CHARACTER

Record 1: Rejected - Error on table KEYTABS.
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00007: unexpected end-of-file encountered
ORA-06512: at "SYS.XMLTYPE", line 5
...

Table KEYTABS:
0 Rows successfully loaded.
7 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.


Space allocated for bind array: 16768 bytes(64 rows)
Read buffer bytes: 1048576

Total logical records skipped: 0
Total logical records read: 7
Total logical records rejected: 7
Total logical records discarded: 0

Run began on Wed Apr 05 19:02:13 2006
Run ended on Wed Apr 05 19:02:15 2006

Elapsed time was: 00:00:01.46
CPU time was: 00:00:00.15


Note 549856.1 shows how to load all XMLType columns as it any other column type. However, how to
load xml data when we are dealing with a table of object XMLTYPE?

SQLLoader log file, screen shots.

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms