views:

538

answers:

3

I have some PLSQL code that calls a remote procedure in order to send an XMLType. What it does, though, is to devide the XMLType into multiple varchar2(4000) parameters, which the procedure accepts. The remote procedure is called via a DBLink.

Why does the XMLType have to be split? Is this restriction applicable to recent database versions (10g)?

+2  A: 

Because sys.xmltype is a user defined type.

Probably, you are getting PLS-00453 - remote operations not permitted on object tables or user-defined.

It`s restiction probably for all database versions (include 10g and 11g).

drnk
+1  A: 

Oracle does not support handle sending user-defined types or LOBs over database links in most situations. XMLType can be either stored as a LOB or a UDT, and probably treated in memory the same way, so it is understandable it wouldn't work.

This question discusses the general issue and has some possible workarounds.

Chris R. Donnelly
+1  A: 

It is a long standing (and stupid) problem from Oracle.

LOBS that are over a certain size are not transferred sucessfully, you must chunk big data into smaller chunks and re-compose them later.

I cannot believe that Oracle can get away with not fixing this, I have been aware of the problem since Oracle 8, but more recent versions might have the bug fixed.

Andrew Russell