Link to home
Start Free TrialLog in
Avatar of jtittler
jtittlerFlag for United States of America

asked on

Problems with output of DBMS_XMLSCHEMA.generateSchema...schema text is truncated and useless? *URGENT*

I am trying to implement insert, update, and delete of complicated relational data in a relational database by using XMLType views. It seems like you can just shove a bunch of xml at the server in one go this way to cut down on data traffic. Anyway, 1st step is to create an object type that matches one of the data structures. I figured I'd start easy and start with a type that matches a table which doesn't have any child data. Here is my object type. It has been successfully created in the db.

CREATE or REPLACE TYPE xm_Supported_Datatype AS OBJECT
(
      name VARCHAR2(20),
      isNumeric NUMBER(1),
      isIntegral NUMBER(1),
      isIEEE NUMBER(1),
      isDoublePrecision NUMBER(1),
      isComplex NUMBER(1),
      isLOB NUMBER(1),
      hasSequence NUMBER(1),
      DDL VARCHAR2(128)
);

Now, generate a schema to match this datatype. I figured I'd use the handy-dandy DBMS_XMLSCHEMA.generateSchema function. At the SQLPLUS prompt I type the following:

SQL> SELECT DBMS_XMLSCHEMA.generateSchema('IDB', 'XM_SUPPORTED_DATATYPE') FROM DUAL;

The output from the command is:

DBMS_XMLSCHEMA.GENERATESCHEMA('IDB','XM_SUPPORTED_DATATYPE')
----------------------------------------------------------------------
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" x

What the heck? I tried this from ISQL*PLUS too. Same output. It seems like the schema text is getting truncated. Why? How can I get the full text of the annotated schema?

I tried changing the serveroutput size to the following:
SQL> SET SERVEROUTPUT ON SIZE 1000000
That didn't help.

I tried turning wrap on:
SQL> SET WRAP ON
That didn't help either.

I really need to make these XSD's. Any ideas why this isn't working? In general is my methodolgy for inserting complicated relational data via xml and XMLType views sound?

Thanks for any help proffered.
Kindest Regards,
Julie
Avatar of jtittler
jtittler
Flag of United States of America image

ASKER

Oops...I forgot to tell you my Oracle Version: 10.2.0.1
Avatar of Sujith
try setting the following

set long 20000
set longchunksize 20000
ASKER CERTIFIED SOLUTION
Avatar of schwertner
schwertner
Flag of Antarctica image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That did it. Thanks!

Julie