ORA-22813: operand value exceeds system limits when generation XML

Hi All,
We are using Oracle 11GR2 database and I am trying to generate XML Files using SQL/XML Functions.
I am in the end of development and while testing I am facing this freaking issue. ORA-22813: operand value exceeds system limits.
SELECT XMLSERIALIZE(DOCUMENT DATA AS CLOB) AS DATA FROM (
          SELECT
          XMLELEMENT (
"Region_Data",
XMLAGG (
XMLFOREST (
R.region as "Region_Name",
R.first_name||R.last_name as "EmployeeFullName",
R.ntlogin as "EmployeeAlias",
R.job_title as "EmployeeRole",
R.sap_number as "SAPNumber",
R.sales_transaction_dt AS "Day",
R.region AS "RegionName",
R.postpaid_totalqty AS "PostpaidCount",
R.postpaid_totaldollars AS "PostpaidAmount",
R.postpaidfeature_totalqty AS "PostpaidFeatureCount",
R.postpaidfeature_totaldollar AS "PostpaidFeatureAmount",
R.prepaid_totalqty AS "PrepaidCount",
R.prepaid_totaldollars AS "PrepaidAmount" ,
R.prepaidfeature_totalqty AS "PrepaidFeatureCount",
R.prepaidfeature_totaldollars AS "PrepaidFeatureAmount",
R.accessory_totalqty AS "AccessoriesCount",
R.accessory_totaldollars AS "AccessoriesAmount",
R.handset_totalqty AS "HandsetsCount",
R.handset_totaldollars AS "HandsetsAmount",
(SELECT XMLAGG (
XMLELEMENT (
"Division",
XMLFOREST (
di.division AS "DivisonName",
di.postpaid_totalqty AS "PostpaidCount",
di.postpaid_totaldollars AS "PostpaidAmount",
di.postpaidfeature_totalqty AS "PostpaidFeatureCount",
di.postpaidfeature_totaldollar AS "PostpaidFeatureAmount",
di.prepaid_totalqty AS "PrepaidCount",
di.prepaid_totaldollars AS "PrepaidAmount" ,
di.prepaidfeature_totalqty AS "PrepaidFeatureCount",
di.prepaidfeature_totaldollars AS "PrepaidFeatureAmount",
di.accessory_totalqty AS "AccessoriesCount",
di.accessory_totaldollars AS "AccessoriesAmount",
di.handset_totalqty AS "HandsetsCount",
di.handset_totaldollars AS "HandsetsAmount",
(SELECT XMLAGG (
XMLELEMENT (
"District",
XMLFOREST (
dis.district AS "DistrictName",
dis.postpaid_totalqty AS "PostpaidCount",
dis.postpaid_totaldollars AS "PostpaidAmount",
dis.postpaidfeature_totalqty AS "PostpaidFeatureCount",
dis.postpaidfeature_totaldollar AS "PostpaidFeatureAmount",
dis.prepaid_totalqty AS "PrepaidCount",
dis.prepaid_totaldollars AS "PrepaidAmount" ,
dis.prepaidfeature_totalqty AS "PrepaidFeatureCount",
dis.prepaidfeature_totaldollars AS "PrepaidFeatureAmount",
dis.accessory_totalqty AS "AccessoriesCount",
dis.accessory_totaldollars AS "AccessoriesAmount",
dis.handset_totalqty AS "HandsetsCount",
dis.handset_totaldollars AS "HandsetsAmount",
(SELECT XMLAGG (
XMLELEMENT (
"Store",
XMLFOREST (
mst.store_id AS "StoreNumber",
mst.store_name AS "StoreLocation",
mst.postpaid_totaldollars AS "PostpaidAmount",
mst.postpaidfeature_totalqty AS "PostpaidFeatureCount",
mst.postpaidfeature_totaldollar AS "PostpaidFeatureAmount",
mst.prepaid_totalqty AS "PrepaidCount",
mst.prepaid_totaldollars AS "PrepaidAmount" ,
mst.prepaidfeature_totalqty AS "PrepaidFeatureCount",
mst.prepaidfeature_totaldollars AS "PrepaidFeatureAmount",
mst.accessory_totalqty AS "AccessoriesCount",
mst.accessory_totaldollars AS "AccessoriesAmount",
mst.handset_totalqty AS "HandsetsCount",
mst.handset_totaldollars AS "HandsetsAmount"
FROM stores_comm_mobility_info_vw mst
WHERE mst.district = dis.district
) "Store_Data")))
FROM diST_comm_mobility_info_vw dis
WHERE dis.division = di.division
) "District_Data")))
FROM div_comm_mobility_info_vw di
WHERE di.region = r.region
) AS "Division_Data"))) AS DATA
FROM reg_comm_mobility_info_vw R GROUP BY region)
This is working fine for conditions where there is less amount of data, but when there is more data this query is failing.
I do not know what to do now. Is there any way of this limit or do I need someother mechanisms to generate XML Files.
The challenge is we need to generate XML Files and send the XML Data to an Interface which will use this data to display in a cell phone.
I am really frustated now as I am getting this error when I am testing for huge amount of data.
Appreciate if anyone can help me out ASAP.
(tHE BELOW XML I am trying to generate)
<REGION>
     <Region_Data>
          <Region_Name>Southwest</Region_Name>
          <EmployeeFullName>AllisonAndersen</EmployeeFullName>
          <EmployeeAlias>AANDERS60</EmployeeAlias>
          <EmployeeRole>District Manager, Retail Sales</EmployeeRole>
          <SAPNumber>P12466658</SAPNumber>
          <Day>JAN</Day>
          <RegionName>Southwest</RegionName>
          <PostpaidCount>52</PostpaidCount>
          <PostpaidAmount>1579.58</PostpaidAmount>
          <PostpaidFeatureCount>296</PostpaidFeatureCount>
          <PostpaidFeatureAmount>4174.19</PostpaidFeatureAmount>
          <AccessoriesCount>394</AccessoriesCount>
          <AccessoriesAmount>45213.87</AccessoriesAmount>
          <Division_Data>
               <Division>
                    <DivisonName>Southern California</DivisonName>
                    <PostpaidCount>52</PostpaidCount>
                    <PostpaidAmount>1579.58</PostpaidAmount>
                    <PostpaidFeatureCount>296</PostpaidFeatureCount>
                    <PostpaidFeatureAmount>4174.19</PostpaidFeatureAmount>
                    <AccessoriesCount>394</AccessoriesCount>
                    <AccessoriesAmount>45213.87</AccessoriesAmount>
                    <District_Data>
                         <District>
                              <DistrictName>Orange County West</DistrictName>
                              <PostpaidCount>52</PostpaidCount>
                              <PostpaidAmount>1579.58</PostpaidAmount>
                              <PostpaidFeatureCount>296</PostpaidFeatureCount>
                              <PostpaidFeatureAmount>4174.19</PostpaidFeatureAmount>
                              <AccessoriesCount>394</AccessoriesCount>
                              <AccessoriesAmount>45213.87</AccessoriesAmount>
                              <Store_Data>
                                   <Store>
                                        <StoreNumber>9551</StoreNumber>
                                        <StoreLocation>TM - BROOKHURST &amp; WARNER</StoreLocation>
                                        <PostpaidAmount>10</PostpaidAmount>
                                        <PostpaidFeatureCount>22</PostpaidFeatureCount>
                                        <PostpaidFeatureAmount>319.89</PostpaidFeatureAmount>
                                        <AccessoriesCount>27</AccessoriesCount>
                                        <AccessoriesAmount>4330</AccessoriesAmount>
                                   </Store>
                              </Store_Data>
                         </District>
                    </District_Data>
               </Division>
          </Division_Data>
     </Region_Data>
</REGION>
Thanks,
Madhu K.

You didn't give any feedback in your previous thread.
Did you try the approach suggested here in {message:id=10998557}, instead of using nested inline subqueries ?

Similar Messages

  • ORA-22813: operand value exceeds system limits

    hi all,
    ORA-22813: operand value exceeds system limits
    the above error occurs while calling a function. in 10g its working fine. after moving it to 11g v r facing the error. Plz help

    KRIS wrote:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE 11.1.0.7.0 Production
    TNS for Linux: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - ProductionIt seems that is a bug,refer
    *Bug 8861467 - ORA-22813 / ORA-600 [12761] can occur in 11g [ID 8861467.8]*
    To fixing problem you need apply 11.2.0.2 (Server Patch Set)

  • Operand value exceeds system limits in sdo_aggr_mbr

    Hi-- i'm trying to get the MBR of a fairly large geometry (1429 vertices) and run into a strange problem:
    when i:
    select sdo_aggr_mbr(shape)
    from FEEDER_LINES_SDO
    where subname = 'OCEANO';
    i get what i expect:
    SDO_GEOMETRY(2003, 82212, NULL, SDO_ELEM_INFO_ARRAY(1,1003, 3),SDO_ORDINATE_ARRAY(712103.736,3876977.34, 733591.744, 3896557.18))
    however when i try to get the subname in my query as well:
    select subname ,sdo_aggr_mbr(shape)
    from FEEDER_LINES_SDO
    where subname = 'OCEANO'
    group by subname;
    i get
    ERROR at line 1:
    ORA-22813: operand value exceeds system limits
    The query fails with "ORA-00937: not a single-group group function" when i leave out the group by clause
    i can get around it with a kludge, but would like to know why the group by fails
    the kludge:
    select subname,min(t.x) minx, min(t.y) miny, max(t.x) maxx, max(t.y) maxy from
    FEEDER_LINES_SDO c,
    TABLE(SDO_UTIL.GETVERTICES(c.shape)) t
    where subname = 'OCEANO'
    group by subname;
    SUBNAME MINX MINY MAXX MAXY
    OCEANO     712103.736 3876977.34 733591.744 3896557.18
    where minx(), miny() etc are variations on:
    function minx (geom_in mdsys.sdo_geometry)
    return number DETERMINISTIC IS
    begin
    return sdo_geom.sdo_min_mbr_ordinate(geom_in,1);
    end;
    the group by expression seems to work fine on geometries with less than 1200 vertices. Is there a system parameter i can change?
    elvis{44}% oerr ora 22813
    22813, 00000, "operand value exceeds system limits"
    // *Cause:  Object or Collection value was too large. The size of the value
    // might have exceeded 30k in a SORT context, or the size might be
    // too big for available memory.
    // *Action:  Choose another value and retry the operation.
    i am running oracle 9.2.0.1 on solaris8
    any insight on this will be greatly appreciated
    cheers
    --kassim

    Hi Kassim,
    At KMS I recently ran into the same ORA-22813, when running this cursor SQL
         CURSOR lcur_montage IS
         select m.mont_id, m.sys_PK, m.krtp_id, m.mont_geom, m.til_dato_id , m.forloeb      
         from MTK_montage m
         where m.fra_dato_id = in_dato_id
         and m.krtp_id = 1           
         order by m.mont_id;
    Omitting the order by clause makes it work fine. If I alternatively omit the SDO_geometry m.mont_geom as a select item, the query also works.
    Our problem seems to arise when trying to sort selected rows, which contain large objects such as SDO_geometry.
    Yesterday we played around with SORT_AREA_SIZE, but to no avail. It turns out to be a known bug.
    When I today search for ORA-22813 in MetaLink, the first list item is
    1.
    9.2.0.X Patch Sets - List of Bug Fixes by Problem Type
    Type: Note
    Doc ID: 217194.1
    Score: 63%
    Modified Date: 18-FEB-2003
    Status: PUBLISHED
    Platform: Generic issue
    Product: Oracle Server - Enterprise Edition
    which unfortunately will not open and reveal its content.
    On the other hand trying MetaLink -> Bugs -> search for 'ORA-22813' gives amongst others Bug 2656107, which looks a lot like my problem.
    For Oracle eyes: - when will this bug be fixed? Does it solve the problem at hand?
    - regards
    Jens Ole Jensen
    Kort & MatrikelStyrelsen (WWW: http://www.kms.dk)
    Danmark  
    version: (32 bit) Oracle9i Enterprise Edition Release 9.2.0.2.0 - Production on Sun/SunOS 5.8 (64 bit)

  • How to fix "ORA-31038:Invalid value ..." in a XML schema

    Hello,
    We are in 11gR2 :
    select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - ProductionWe load XML files based on a registered XML schema.
    Here is the top of our XML schema:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:xdb="http://xmlns.oracle.com/xdb"
             xmlns="http://www.capgemini.com/xsd/projet.xsd"
             targetNamespace="http://www.capgemini.com/xsd/projet.xsd"
             elementFormDefault="unqualified"
             blockDefault="#all">
      <xsd:element name="WORKBENCH_PROJECT" xdb:defaultTable="WORKBENCH_PROJECT_TABLE">
        <xsd:complexType xdb:maintainDOM="false">
          <xsd:sequence>
            <xsd:element ref="BaseCalendars"/>
            <xsd:element ref="PoolResources"/>
            <xsd:element ref="Projects"/>
          </xsd:sequence>
    ...We experience error ORA-31038: Invalid number value ... at the load of the XML, when the focus goes to a string type attribute :
    Here it is :
            <Task
              UID="AJ\&apos;UF`2=_```)O0H;&quot;P!```?P```0" earlyStart="2010-04-20T08:00:00" category="Run"
              baseTime="2010-03-26T09:22:00" lateStart="2010-04-20T08:00:00" start="2010-04-20T08:00:00"
              proxy="false" earlyFinish="2010-05-12T17:00:00" lateFinish="2010-05-12T17:00:00"
              critical="true" status="2" shortName="OASIS 3.2" outlineLevel="4" baseFinish="2010-06-11T17:00:00"
              finish="2010-05-12T17:00:00" summary="false" baseStart="2010-05-17T08:00:00" baselineDuration="20.0"
              milestone="false" name="OASI 3.2.1 : Association d&apos;un plan à un PFO" fixed="true"
              locked="false" key="false" percComp="1.0" totalSlack="0.0" unplanned="false">
              <Assignments>
                <Assignment
                  status="2" actualWork="24.0" resourceID="SMOUFLIH" start="2010-04-20T08:00:00" baselineWork="0.0"
    Here is the XML schema part where the load fails ( at the attribute *<xsd:attribute name="name" type="xsd:string"/>* ) :
      <xsd:element name="Task" xdb:defaultTable="">
        <xsd:complexType xdb:maintainDOM="false">
          <xsd:sequence>
            <xsd:element ref="Assignments" minOccurs="0"/>
            <xsd:element ref="BaselineDetails" minOccurs="0"/>
            <xsd:element ref="Constraints" minOccurs="0"/>
            <xsd:element ref="Notes" minOccurs="0"/>
          </xsd:sequence>
          <xsd:attribute name="UID"/>
          <xsd:attribute name="taskID" type="xsd:string"/>
          <xsd:attribute name="baseFinish" type="xsd:NMTOKEN"/>
          <xsd:attribute name="baseStart" type="xsd:NMTOKEN"/>
          <xsd:attribute name="baseTime" type="xsd:NMTOKEN"/>
          <xsd:attribute name="baselineDuration" type="xsd:decimal"/>
          <xsd:attribute name="category" type="xsd:string"/>
          <xsd:attribute name="critical" type="xsd:string"/>
          <xsd:attribute name="earlyFinish" type="xsd:NMTOKEN"/>
          <xsd:attribute name="earlyStart" type="xsd:NMTOKEN"/>
          <xsd:attribute name="finish" type="xsd:NMTOKEN"/>
          <xsd:attribute name="fixed" type="xsd:string"/>
          <xsd:attribute name="guidelines" type="xsd:string"/>
          <xsd:attribute name="key" type="xsd:string"/>
          <xsd:attribute name="lastUpdatedBy" type="xsd:string"/>
          <xsd:attribute name="lastUpdatedDate" type="xsd:NMTOKEN"/>
          <xsd:attribute name="lateFinish" type="xsd:NMTOKEN"/>
          <xsd:attribute name="lateStart" type="xsd:NMTOKEN"/>
          <xsd:attribute name="locked" type="xsd:string"/>
          <xsd:attribute name="methodID" type="xsd:string"/>
          <xsd:attribute name="milestone" type="xsd:string"/>
          <xsd:attribute name="name" type="xsd:string"/>
          <xsd:attribute name="outlineLevel" type="xsd:integer"/>
          <xsd:attribute name="percComp" type="xsd:decimal"/>
          <xsd:attribute name="priority" type="xsd:string"/>
          <xsd:attribute name="proxy" type="xsd:string"/>
          <xsd:attribute name="shortName" type="xsd:string"/>
          <xsd:attribute name="start" type="xsd:NMTOKEN"/>
          <xsd:attribute name="status" type="xsd:integer"/>
          <xsd:attribute name="summary" type="xsd:string"/>
          <xsd:attribute name="totalSlack" type="xsd:double"/>
          <xsd:attribute name="unplanned" type="xsd:string"/>
          <xsd:attribute name="userText1" type="xsd:string"/>
          <xsd:attribute name="userText2" type="xsd:string"/>
          <xsd:attribute name="userText3" type="xsd:string"/>
          <xsd:attribute name="userText4" type="xsd:string"/>
          <xsd:attribute name="userText5" type="xsd:string"/>
      We know how to fix it manually :
    The workaround is to :
    remove all "&apos;" in each attribute called "name" But we suppose we need to amend the XML schema with a proper change. And we don't know how to do this.
    The weird is that we've never noticed this error earlier on a 11gR1 DB... This error only occurs on our brand new 11.2.0.2
    I hope it's clear enough for your understanding.
    Do you have any advice ?
    Thanks in advance,
    Olivier

    What are your NLS Settings
    SQL> select *
      2  from nls_database_parameters
      3  where parameter in ('NLS_LANGUAGE', 'NLS_TERRITORY', 'NLS_CHARACTERSET');
    PARAMETER                                SQL> select *
      2  from nls_database_parameters
      3  where parameter in ('NLS_LANGUAGE', 'NLS_TERRITORY', 'NLS_CHARACTERSET');
    PARAMETER                    VALUE
    NLS_LANGUAGE              AMERICAN
    NLS_TERRITORY             AMERICA
    NLS_CHARACTERSET       AL32UTF8
    SQL>With my settings I do not see a problem with a cut-down test...
    SQL> spool testcase.log
    SQL> --
    SQL> connect sys/oracle as sysdba
    Connected.
    SQL> --
    SQL> set define on
    SQL> set timing on
    SQL> --
    SQL> def USERNAME = CG
    SQL> --
    SQL> def PASSWORD = &USERNAME
    SQL> --
    SQL> -- def XMLDIR = &1
    SQL> --
    SQL> def USER_TABLESPACE = USERS
    SQL> --
    SQL> def TEMP_TABLESPACE = TEMP
    SQL> --
    SQL> drop user &USERNAME cascade
      2  /
    old   1: drop user &USERNAME cascade
    new   1: drop user CG cascade
    User dropped.
    Elapsed: 00:00:01.72
    SQL> grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASSWORD
      2  /
    old   1: grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASSWORD
    new   1: grant create any directory, drop any directory, connect, resource, alter session, create view to CG identified by CG
    Grant succeeded.
    Elapsed: 00:00:00.01
    SQL> alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
      2  /
    old   1: alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
    new   1: alter user CG default tablespace USERS temporary tablespace TEMP
    User altered.
    Elapsed: 00:00:00.01
    SQL> connect &USERNAME/&PASSWORD
    Connected.
    SQL> --
    SQL> -- create or replace directory XMLDIR as '&XMLDIR'
    SQL> -- /
    SQL> var SCHEMAURL1    varchar2(256)
    SQL> VAR XMLSCHEMA1    CLOB;
    SQL> VAR INSTANCE1     CLOB;
    SQL> --
    SQL> set define off
    SQL> --
    SQL> alter session set events='31098 trace name context forever'
      2  /
    Session altered.
    Elapsed: 00:00:00.00
    SQL> begin
      2    :SCHEMAURL1:= 'http://xmlns.example.com/testcase.xsd';
      3    :XMLSCHEMA1 :=
      4  '<?xml version="1.0" encoding="UTF-8"?>
      5  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="qualified" attributeFormDefault="unqualified">
      6     <xsd:element name="Task" xdb:defaultTable="TASK_TABLE">
      7      <xsd:complexType xdb:maintainDOM="false">
      8        <xsd:sequence>
      9          <xsd:element name="Notes" type="xsd:string" minOccurs="0"/>
    10        </xsd:sequence>
    11        <xsd:attribute name="UID"/>
    12        <xsd:attribute name="taskID" type="xsd:string"/>
    13        <xsd:attribute name="baseFinish" type="xsd:NMTOKEN"/>
    14        <xsd:attribute name="baseStart" type="xsd:NMTOKEN"/>
    15        <xsd:attribute name="baseTime" type="xsd:NMTOKEN"/>
    16        <xsd:attribute name="baselineDuration" type="xsd:decimal"/>
    17        <xsd:attribute name="category" type="xsd:string"/>
    18        <xsd:attribute name="critical" type="xsd:string"/>
    19        <xsd:attribute name="earlyFinish" type="xsd:NMTOKEN"/>
    20        <xsd:attribute name="earlyStart" type="xsd:NMTOKEN"/>
    21        <xsd:attribute name="finish" type="xsd:NMTOKEN"/>
    22        <xsd:attribute name="fixed" type="xsd:string"/>
    23        <xsd:attribute name="guidelines" type="xsd:string"/>
    24        <xsd:attribute name="key" type="xsd:string"/>
    25        <xsd:attribute name="lastUpdatedBy" type="xsd:string"/>
    26        <xsd:attribute name="lastUpdatedDate" type="xsd:NMTOKEN"/>
    27        <xsd:attribute name="lateFinish" type="xsd:NMTOKEN"/>
    28        <xsd:attribute name="lateStart" type="xsd:NMTOKEN"/>
    29        <xsd:attribute name="locked" type="xsd:string"/>
    30        <xsd:attribute name="methodID" type="xsd:string"/>
    31        <xsd:attribute name="milestone" type="xsd:string"/>
    32        <xsd:attribute name="name" type="xsd:string"/>
    33        <xsd:attribute name="outlineLevel" type="xsd:integer"/>
    34        <xsd:attribute name="percComp" type="xsd:decimal"/>
    35        <xsd:attribute name="priority" type="xsd:string"/>
    36        <xsd:attribute name="proxy" type="xsd:string"/>
    37        <xsd:attribute name="shortName" type="xsd:string"/>
    38        <xsd:attribute name="start" type="xsd:NMTOKEN"/>
    39        <xsd:attribute name="status" type="xsd:integer"/>
    40        <xsd:attribute name="summary" type="xsd:string"/>
    41        <xsd:attribute name="totalSlack" type="xsd:double"/>
    42        <xsd:attribute name="unplanned" type="xsd:string"/>
    43        <xsd:attribute name="userText1" type="xsd:string"/>
    44        <xsd:attribute name="userText2" type="xsd:string"/>
    45        <xsd:attribute name="userText3" type="xsd:string"/>
    46        <xsd:attribute name="userText4" type="xsd:string"/>
    47        <xsd:attribute name="userText5" type="xsd:string"/>
    48             </xsd:complexType>
    49     </xsd:element>
    50  </xsd:schema>';
    51    :INSTANCE1 :=
    52  '<Task
    53            UID="AJ\&apos;UF`2=_```)O0H;&quot;P!```?P```0" earlyStart="2010-04-20T08:00:00" category="Run"
    54            baseTime="2010-03-26T09:22:00" lateStart="2010-04-20T08:00:00" start="2010-04-20T08:00:00"
    55            proxy="false" earlyFinish="2010-05-12T17:00:00" lateFinish="2010-05-12T17:00:00"
    56            critical="true" status="2" shortName="OASIS 3.2" outlineLevel="4" baseFinish="2010-06-11T17:00:00"
    57            finish="2010-05-12T17:00:00" summary="false" baseStart="2010-05-17T08:00:00" baselineDuration="20.0"
    58            milestone="false" name="OASI 3.2.1 : Association d&apos;un plan A  un PFO" fixed="true"
    59            locked="false" key="false" percComp="1.0" totalSlack="0.0" unplanned="false"/>';
    60  end;
    61  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL> set define on
    SQL> --
    SQL> declare
      2    V_XML_SCHEMA xmlType := XMLType(:XMLSCHEMA1);
      3  begin
      4    DBMS_XMLSCHEMA.registerSchema
      5    (
      6      SCHEMAURL        => :SCHEMAURL1,
      7      SCHEMADOC        => V_XML_SCHEMA,
      8      LOCAL            => TRUE,
      9      GENBEAN          => FALSE,
    10      GENTYPES         => TRUE,
    11      GENTABLES        => TRUE,
    12      ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    13    );
    14  end;
    15  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.46
    SQL> desc TASK_TABLE
    Name                                      Null?    Type
    TABLE of SYS.XMLTYPE(XMLSchema "http://xmlns.example.com/testcase.xsd" Element "Task") STORAGE Object-relational TYPE "Task3632_T"
    SQL> --
    SQL> insert into TASK_TABLE values ( XMLTYPE(:INSTANCE1))
      2  /
    1 row created.
    Elapsed: 00:00:00.01
    SQL> commit
      2  /
    Commit complete.
    Elapsed: 00:00:00.09and am able to extract the value of the name attribute correct
    SQL> select XMLCAST(XMLQUERY('/Task/@name' passing OBJECT_VALUE returning content) as VARCHAR2(64))
      2    from TASK_TABLE
      3  /
    XMLCAST(XMLQUERY('/TASK/@NAME'PASSINGOBJECT_VALUERETURNINGCONTEN
    OASI 3.2.1 : Association d'un plan A  un PFO
    Elapsed: 00:00:00.00Could you try this simplied test in your database...
    Edited by: mdrake on Nov 30, 2010 8:36 PM

  • ORA 22813 in merge statement

    hi gems..good afternoon...
    My database version is 11.2.0.1.0 64 bit Solaris OS.
    I am facing an "ORA-22813: operand value exceeds system limits" while running a procedure.
    I have used loggers and found that it is getting failed in a MERGE statement.
    That merge statement is used to merge a table with a collection. the code is like below:
    MERGE /*+ INDEX(P BALANCE_HISTORIC_INDEX) */
        INTO BALANCE_HOLD_HISTORIC P
        USING TABLE(GET_BALANCE_HIST(V_MERGE_REC)) M
        ON (P.CUSTOMER_ID = M.CUSTOMER_ID AND P.BOOK_ID = M.BOOK_ID AND P.PRODUCT_ID = M.PRODUCT_ID AND P.SUB_BOOK_ID = M.SUB_BOOK_ID AND)
        WHEN MATCHED THEN
          UPDATE
             <set .....>
        WHEN NOT MATCHED THEN
          INSERT<.....>The parameter of the function GET_BALANCE_HIST(V_MERGE_REC) is a table type.
    Now the function GET_BALANCE_HIST(V_MERGE_REC) is a pipelined function and we have used that because the collection V_MERGE_REC may get huge with data.
    This proc was running fine from the beginning but from day before yesterday it was continously throwing ORA 22813 error in that line.
    please help..thanks in advance..

    hi paul..thanks for your reply...
    the function GET_BALANCE_HIST is not selecting data from any tables.
    What this pipeline function is doing is, it is taking the huge collection V_MERGE_REC as parameter and releasing its datas in pipelined form. The code for the functions is :
    CREATE OR REPLACE FUNCTION GET_BALANCE_HIST(P_MERGE IN TAB_TYPE_BALANCE_HISTORIC)
      RETURN TAB_TYPE_BALANCE_HISTORIC
      PIPELINED AS
      V_MERGE TAB_TYPE_BALANCE_HISTORIC := TAB_TYPE_BALANCE_HISTORIC();
    BEGIN
      FOR I IN 1 .. P_MERGE.COUNT LOOP
        V_MERGE.EXTEND;
        V_MERGE(V_MERGE.LAST) := OBJ_TYPE_BALANCE_HISTORIC(P_MERGE(I).CUSTOMER_ID,
                                                 P_MERGE(I).BOOK_ID,
                                                 P_MERGE(I).PRODUCT_ID,
                                                 P_MERGE(I).SUB_BOOK_ID,
                                                 P_MERGE(I).EARNINGS,
                                                 P_MERGE(I).EARNINGS_HOUSE,
                                                 P_MERGE(I).QUANTITY,
                                                 P_MERGE(I).ACCOUNT_INTEGER);
      END LOOP;
      FOR J IN 1 .. V_MERGE.COUNT LOOP
        PIPE ROW(OBJ_TYPE_BALANCE_HISTORIC(V_MERGE(I).CUSTOMER_ID,
                                                 V_MERGE(I).BOOK_ID,
                                                 V_MERGE(I).PRODUCT_ID,
                                                 V_MERGE(I).SUB_BOOK_ID,
                                                 V_MERGE(I).EARNINGS,
                                                 V_MERGE(I).EARNINGS_HOUSE,
                                                 V_MERGE(I).QUANTITY,
                                                 V_MERGE(I).ACCOUNT_INTEGER));
      END LOOP;
      RETURN;
    END;I think the error is comming because of the parameter value of V_MERGE_REC. Since it is huge, so loading that into memory is causing problem. But in this case, how can I resolve it?? Can I use a global temporary table for this??
    Please suggest...

  • ORA-22813 on SELECT with ORDER BY

    Hi all,
    I have on a server Windows 2003 (3Gb RAM) an Oracle Database 9.2.0.1
    Until last week all seems right, but now when i submit this SQL:
    Select a,b,c,d,e... from mytable order by a,b
    I have this error:
    ORA-22813 "operand value exceeds system limits"
    -If i remove a first or second column from order by clause
    -If i remove a geometry column or some columns from the select
    It works.
    To fix this problem I have tried to:
    Recreate any indexes (data and spatial), no result
    Enable/Disable all costraints, no result
    Set parameter hash_join_tables to true and false, no result
    Enlarge the PGA, no result
    Copy only 10 record in another blank table, no result
    Export the table and import it in another database in another server (Windows 2003 / Oracle 9.2.0.1). The Export and Import are ok but the error is the same.
    Can you help me? Have you any suggest?
    Thanks

    Error:     ORA-22813
    Text:     operand value exceeds system limits
    Cause:     Object or Collection value was too large. The size of the value might
         have exceeded 30k in a SORT context, or the size might be too big for
         available memory.
    Action:     Choose another value and retry the operation.Has your data changed such that one of the recent values is hitting this limit.
    Note also Metalink bug 5959987 Spatial aggregations fail with ORA-22813 which is only confirmed as being in 10.2.0.3 but says
    ORA-22813 can occur when performing Spatial aggregations
    (SDO_AGGR_UNION or SDO_AGGR_CONCAT_LINES)
    when used with a GROUP BY clause and the input contains
    geometries that occupy more than 32K."

  • ORA-22813 ?

    Hi,
    I've run into an interesting ORA-22813 error. I ran the following SQL aginst an xmltype table.
    SQL> select
    2 extractValue(value(a), '/GTP/TransmissionSource@ID') TransmissionSourceID,
    3 extractValue(value(a), '/GTP/TransmissionSource@Name') TransmissionSourceName,
    4 extractValue(value(b), '/Study@ID') StudyID,
    5 extractValue(value(b), '/Study@Name') StudyName,
    6 extractValue(value(b), '/Study@TransmissionType') StudyTransmissionType,
    7 extractValue(value(c), '/Site@ID') SiteID,
    8 extractValue(value(d), '/Investigator@ID') InvestigatorID,
    9 extractValue(value(d), '/Investigator@Name') InvestigatorName
    10 from gtp x,
    11 table(xmlsequence(extract(value(x),'/GTP'))) a,
    12 table(xmlsequence(extract(value(x),'/GTP/Study'))) b,
    13 table(xmlsequence(extract(value(x),'/GTP/Study/Site'))) c,
    14 table(xmlsequence(extract(value(x),'/GTP/Study/Site/Investigator'))) d
    15 /
    select
    extractValue(value(a), '/GTP/TransmissionSource@ID') TransmissionSourceID,
    extractValue(value(a), '/GTP/TransmissionSource@Name') TransmissionSourceName,
    extractValue(value(b), '/Study@ID') StudyID,
    extractValue(value(b), '/Study@Name') StudyName,
    extractValue(value(b), '/Study@TransmissionType') StudyTransmissionType,
    extractValue(value(c), '/Site@ID') SiteID,
    extractValue(value(d), '/Investigator@ID') InvestigatorID,
    extractValue(value(d), '/Investigator@Name') InvestigatorName
    from gtp x,
    table(xmlsequence(extract(value(x),'/GTP'))) a,
    table(xmlsequence(extract(value(x),'/GTP/Study'))) b,
    table(xmlsequence(extract(value(x),'/GTP/Study/Site'))) c,
    table(xmlsequence(extract(value(x),'/GTP/Study/Site/Investigator'))) d
    ORA-22813: operand value exceeds system limits
    SQL>
    Not sure how to get around this one? The query was correctly a number of times without any issue.
    Also, I've got over ~90 SYS_IOT_OVER_39#### and ~70 SYS_NT+qzhFuERTRio9lfg061upw== bla, bal table objects.
    Not sure what these are?
    Thanks.

    OK
    A number of questions. I assume GTP only occurs once per document (eg is the root node), in which case there is no point to 'sequencing' GTP.
    I'm assuming that Study can occur more than once with GTP, and Site more than once within Study and Investigator more than once with Site.
    If the above is true the problem may be caused by the way you are constructing your sequences. XMLSequence relies on a correlated join. Hence each level of nesting should be obtained as a subset of the previous level. In your case you are creating a cartesian product which may explain the error...
    Try the following
    select
    extractValue(value(x), '/GTP/TransmissionSource@ID') TransmissionSourceID,
    extractValue(value(x), '/GTP/TransmissionSource@Name') TransmissionSourceName,
    extractValue(value(study), '/Study@ID') StudyID,
    extractValue(value(study), '/Study@Name') StudyName,
    extractValue(value(study), '/Study@TransmissionType') StudyTransmissionType,
    extractValue(value(site), '/Site@ID') SiteID,
    extractValue(value(investigator), '/Investigator@ID') InvestigatorID,
    extractValue(value(d), '/Investigator@Name') InvestigatorName
    from gtp x,
    table(xmlsequence(extract(value(x),'/GTP/Study'))) study,
    table(xmlsequence(extract(value(study),'/Study/Site'))) site,
    table(xmlsequence(extract(value(site),'Site/Investigator'))) investigator
    The tables you see imply that you have 70 different collections within your XML Schema.

  • XML data value exceeds maximum length - ORA-30951

    Hello,
    I am receiving ORA-30951: Element or attribute at Xpath /dataroot/Respondent[1]/Response[3]/Value exceeds maximum length error during the XML load.
    I have registered the schema and it works fine when the Value is less than 64k but fails if its greater. I tried changing the type of Value to type="xsd:base64Binary" xdb:maintainDOM="false" xdb:SQLName="LOB_DATA" xdb:SQLType="BLOB" but then I get ORA-00932: inconsistent datatypes error.
    Can someone please let me know what I am doing wrong or is there a way I can load more than 64k length elements on 10g?
    Thanks
    Here is my schema.
    var SCHEMAURL varchar2(256)
    var XMLSCHEMA CLOB
    set define off
    begin
    :SCHEMAURL := 'http://xmlns.example.com/Svy_Resp.xsd';
    :XMLSCHEMA := '<?xml version="1.0"; encoding="utf-16"?>
    <xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" version="1.0"; xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xdb:storeVarrayAsTable="true">
    <xsd:element name="dataroot" xdb:defaultTable="SVY_RESP_XML_SCHEMA" type="datarootType" />
    <xsd:complexType name="datarootType" xdb:maintainDOM="false"
    xdb:SQLType="Dataroot_T">
    <xsd:sequence>
    <xsd:element maxOccurs="unbounded" name="Respondent" type="RespondentType" />
    </xsd:sequence>
    <xsd:attribute name="generated" type="xsd:dateTime" />
    </xsd:complexType>
    <xsd:complexType name="RespondentType" xdb:maintainDOM="false" xdb:SQLType="Respondent_Type">
    <xsd:sequence>
    <xsd:element name="RespondentID" type="xsd:int" />
    <xsd:element name="KsID" type="xsd:int" />
    <xsd:element name="email" type="xsd:string" />
    <xsd:element name="SyID" type="xsd:int" />
    <xsd:element name="KSuID" type="xsd:int" />
    <xsd:element name="Completed" type="xsd:int" />
    <xsd:element name="SubmitDateTime" type="xsd:dateTime" />
    <xsd:element maxOccurs="unbounded" name="Response" type="ResponseType" />
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="ResponseType" xdb:maintainDOM="false" xdb:SQLType="Response_Type">
    <xsd:sequence>
    <xsd:element name="ResponseID" type="xsd:int" />
    <xsd:element name="RespondentID" type="xsd:int" />
    <xsd:element name="CID" type="xsd:int" />
    <xsd:element name="AID" type="xsd:int" />
    <xsd:element name="Value" type="xsd:string"/>
    <xsd:element name="QID" type="xsd:int" />
    <xsd:element name="SID" type="xsd:int" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>';
    end;
    /

    Thanks for the quick response. I am not able to modify the source file, but will it be possible to set the value to NULL if it exceeds the max length instead of failure?
    Thanks

  • ORA-01536: space quota exceeded for tablespace 'SYSTEM'

    Hi All,
    Please help me to understand the below issue. I am trying to create a table as below. Connected as APPS user.
    SQL>create table test_ts(id number) tablespace APPS_TS_TX_DATA
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01536: space quota exceeded for tablespace 'SYSTEM'
    ORA-06512: at line 2
    Below are the details of the user
    SQL>select * from user_ts_quotas
            where  tablespace_name = 'APPS_TS_TX_DATA'
    TABLESPACE_NAME     BYTES     MAX_BYTES     BLOCKS     MAX_BLOCKS
    APPS_TS_TX_DATA     929038336     -1     113408     -1
    SQL>select * from user_ts_quotas
            where  tablespace_name = 'SYSTEM'
    No Rows Returned.

    Hi,
    Thanks for the response. There is no QUOTA defined for SYSTEM user, so it is UNLIMITED, No?
    Below are the details of "SYSTEM" tablespace. Is there any issue with this?
    TABLESPACE_NAME           BLOCK_SIZE  INITIAL_EXTENT       NEXT_EXTENT           MIN_EXTENTS            MAX_EXTENTS         
    SYSTEM                  8192               16384         16384                1                     505

  • :system.cursor_block value does not change when mouse click

    Form created with Forms version 6.0.8.8.0. Consists of a control block that has the toolbar buttons, a filter control block that contains item, and a data block. The filter control block and data block are on a tabbed canvas. There are 3 tabs with corresponding filter control block and data block on each.After the data block is queried, code sets the navigation to the control block with the go_item built-in. The user would use a mouse click on the filter control block on one of the tabs to activate an LOV, code is in a generic when-mouse-click trigger that will determine the item focus with the value in the system variable :system.cursor_block. Works for the first tab. Does not work for 2nd or 3rd tab. On-error trigger does not capture any error. Values for :system.cursor_block for tab 1 show that value before mouse click is 'control.detail' and after mouse click is 'filter.a'. For tabs 2 and 3 the value before mouse lick is 'control.detail' and after mouse click is 'control.detail' instead of 'fiter.b' or 'filter.c'. Verified that the 3 filter blocks are identical. Can anyone shed some light on this anomoly? I have been looking for this solution (many different iterations and changes to trap it) for too long.

    :System.Cursor_Block reports the name of a block, NOT a BlockName.ItemName.
    Use :System.Trigger_Item with your mouse click, or :System.Cursor_Item.

  • ORA-22813 error when deleting spatial objects in LIVE

    Hi,
    We are getting an ORA-22813 error when attempting to delete a spatial object from a version-enabled table in workspace LIVE. The spatial object to be removed has a SDO type of multipolygon. The geometry information consists of 4 rings with a combined ordinate count of 4120. The statement used to delete the row is:
    delete from tableA where tableA.id in (select tableA.id from tableA where tableA.id = 3);
    The error occurs only on a 10g R1 Oracle instance (10.1.0.5.0) with Workspace Manager version 10.1.0.7.1. The delete operation succeeds without problems on a 10g R2 (10.2.0.2.0) instance with Workspace Manager version 10.2.0.3.1. The statement is also executed successfully on the 10g R1 instance if the table is not version-enabled.
    Any help on this would be appreciated.
    Thanks

    Hi,
    I would recommend filing a TAR in this one. The only ora-22813 error involving workspace manager and geometry columns that I know about involves queries that need to sort data for which the size of the geometry column was >30k. Does the execution plan for the delete statement involve any kind of sort? However, this is an old 9.2 bug, that I believe was fixed for all 10.1 and newer releases.
    Does the same error happen if you do not use the subquery?
    Regards,
    Ben

  • System crashes when using Middle Values on a vertical progress Bar

    I've been trying for several days to get a  Vertical Slider/Vertical progress bar  to work using middle values. Sometimes it'll work fine in the High and Low values mode but crashes when you choose the middle values mode.  After many iterations I finally got one verticle slider bar with middle values to work but when I try to add a second slider it crashes again.  I'm getting the error that memory cannot be read.

    Hi Maureen,
    Can you please tell us which version of Xcelsius you are running?
    If it's Crystal Xcelsius 4.5, are you running a Hot Fix?  If so, which version?  This can checked by going to Help --> About Crystal Xcelsius, and then analyzing the Application Version field.
    If it's Xcelsius 2008, which version (Present or Engage) are you using? 
    Are you using Service Pack 1?  To check if you're running SP1, you can go to Help --> About Xcelsius.  The Build Number field should end with 247 if you have it.
    Thanks,
    -david

  • SERVICE PO VALUE EXCEEDING IN SERVICE ENTRY SHEET

    Hi all
    How to restrict the Service Entry sheet value which is exceeding PO value (In Service PO Unlimited & Price change option are selected)
    Here scenario is user will place order for say 1 set with value of 50 Lakh with only one service line item & will select the unlimited & price change option.
    Now he will receive invoice in parts & will post accordingly with quantity 1 set each time & value as per each invoice. in this case value of invoice raises can be more than po Value so how to restrict the same.
    OR How to map this type of scenario otherwise to avoid above
    Kindly suggest
    Thanks & regards,
    Rajesh

    Dear,
    Please check with S.-Based IV check box selected in Invoice tab of Item details. This option useful for
    Indicator for Service-Based Invoice Verification
    Indicates that service-based invoice verification is defined for a purchase order item.
    In service-based invoice verification, the quantities and values of services performed and ordered to date are available for checking purposes. As in the case of invoice verification for materials, you are able to change quantities and values within the permitted tolerances.
    In addition, if service-based invoice verification is active, the acceptance posting is carried out at the level of the services in the entry sheet, and the quantities and values of the accepted and invoiced services are shown in the PO history.
    And I suggest to enter Limitations for Servce to limit the :
    Overall Limit
    Maximum value that the total of all unplanned services (or the value of the material) covered by this document item may not exceed.
    Limits can be used in service lines and the items of blanket purchase orders.
    When services actually performed are entered in service entry sheets (or at the time of goods receipt in the case of materials), the system checks the entered values with regard to adherence to this maximum value. If the overall limit is exceeded, it issues an appropriate message.
    If you have also fixed sub-limits within the overall limit for an item, each time services are entered or goods receipts are recorded the system checks whether the individual sub-limits and the overall limit have/has been adhered to.
    By entering in Limits tab of item details.
    Hope this will solve your issue.
    Regards,
    Syed Hussain.

  • DRG-11112: length of CLOB query value exceeds maximum of 64000

    Is there a CLOB length limitation when running an Oracle Text search? (v 11.1.0.7) I have checked the Reference Guide and Application Developer's Guide.
    --create table
    create table nk_1929(id number, vc_a clob);
    --insert dummy data
    declare
    vc_clob clob;
    begin
    vc_clob := lpad(to_clob('a'), 222920, 'a');
    insert into nk_1929 values(1, vc_clob);
    end;
    --create index
    create index nk_1929_ndx on nk_1929(vc_a)
    indextype is ctxsys.context parameters('
    datastore ctxsys.default_datastore
    stoplist ctxsys.empty_stoplist');
    --run query with a search string longer than 64000
    declare
    str1 clob;
    query_term clob;
    begin
    select vc_a into query_term from nk_1929 where id = 1;
    str1 := 'select id from nk_1929 where contains(vc_a, :1) > 0';
    execute immediate str1 using query_term;
    end;
    ORA-29902: error in executing ODCIIndexStart() routine
    ORA-20000: Oracle Text error:
    DRG-11112: length of CLOB Query Value exceeds maximum of 64000
    Please let me know if I am missing something here?

    Same 64000 CLOB query value limitation is also generated with a simple select:
    --run query with a search string longer than 64000
    declare
    vn_id number;
    query_term clob;
    begin
    select vc_a into query_term from nk_1929 where id = 1;
    select max(id) into vn_id from nk_1929 where contains(vc_a, query_term) > 0;
    end;
    ORA-29902: error in executing ODCIIndexStart() routine
    ORA-20000: Oracle Text error:
    DRG-11112: length of CLOB Query Value exceeds maximum of 64000

  • Important--Bug(ORA-22813) fixes in Oracle Database 10g  Release 10.2.0.4

    Hi,
    I found that in SELECT STATEMENTs where we use "xmlagg() functions with a GROUP BY/ORDER BY,it fails with ORA-22813 if the result is too large.
    This happens as there is a hard coded limit on the result size. (max 30k)
    Next,i confirmed that and when i removed a portion of the XML agg() values and executed it---Wonders,it runs perfectly fine.
    This means that ""xmlagg() functions with a GROUP BY/ORDER BY,fails with ORA-22813 since the result is too large.
    I have come to know that patch "Release 10.2.0.4" has the fix for Bug-22813 for "xmlagg() functions with a GROUP BY/ORDER BY".
    Could you all please confirm that "Oracle Database 10g Release 10.2.0.4" (patch 10.2.04) fixes the issue?
    Based on your confirmation,i can go ahead to get the patch installed.
    Current Version:-Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
    Thanks
    Mainak

    Your query should be written something like this..
    select d.*
      from fbnk_customer,
           XMLTABLE
              '//c3'
              passing XMLRECORD
              columns
              C3_VALUE varchar2(60) path 'text()'
           ) d
    where recid='1001400'; Although it would be better to use an extact path expression rather than '//c3'

Maybe you are looking for