275K Limit on xmlType CLOB?

I seem to be running into a limit on the size of the CLOB returned from a select into an XMLType. When it gets around 275K it doesn't return a value anymore - it does not return an error, just the .getclobval is empty. I am using the Select XMLAgg(XMLElement) Into XMLType method. Using 9.2 ORA DB running on UNIX. If anybody knows if there is actually a limit, it would be greatly appreciated. I know I can use the dbms_xmlgen method but I want to avoid that if possible.
The full stored proc text:
PROCEDURE GetISRNumber ( RetXML OUT CLOB ) IS
xmlTypeRet xmlType;
begin
SELECT xmlagg(XMLELEMENT("Record", XMLELEMENT("JobNumber", ISR.ISR_NO)
, XMLELEMENT( "address", isr.COMPL_ADDRESS)
, XMLElement( "Street", isr.Street_Name1)
, XMLElement( "CivicExtensionDFJOIK", isr.ALPHA_CIVIC)
, XMLElement( "Created_Date", isr.created_date)
)) AS "XMLReturned"
INTO xmlTypeRet
FROM isr ISR ;
RetXML := xmltyperet.getclobval();
RetXML := '<Job>' || RetXML || '</Job>';
EXCEPTION
WHEN OTHERS THEN
Case SQLCODE
When -30625 Then
RetXML := '<Job>No Records Found</Job>';
Else
Raise;
END CASE;
end GetISRNumber;

Please post the question at
PL/SQL XML Programming
for quick response.

Similar Messages

  • Size limit on xmlType CLOB?

    I seem to be running into a limit on the size of the CLOB returned from a select into an XMLType. When it gets around 275K it doesn't return a value anymore - it does not return an error, just the .getclobval is empty. I am using the Select XMLAgg(XMLElement) Into XMLType method. Using 9.2 ORA DB running on UNIX. If anybody knows if there is actually a limit, it would be greatly appreciated. I know I can use the dbms_xmlgen method but I want to avoid that if possible.
    The full stored proc text:
    PROCEDURE GetISRNumber ( RetXML OUT CLOB ) IS
    xmlTypeRet xmlType;
    begin
    SELECT xmlagg(XMLELEMENT("Record", XMLELEMENT("JobNumber", ISR.ISR_NO)
    , XMLELEMENT( "address", isr.COMPL_ADDRESS)
    , XMLElement( "Street", isr.Street_Name1)
    , XMLElement( "CivicExtensionDFJOIK", isr.ALPHA_CIVIC)
    , XMLElement( "Created_Date", isr.created_date)
    )) AS "XMLReturned"
    INTO xmlTypeRet
    (Select ISR_NO, COMPL_ADDRESS, Street_Name1, ALPHA_CIVIC, Created_Date FROM ISR)
    RetXML := xmltyperet.getclobval();
    RetXML := '<Job>' || RetXML || '</Job>';
    EXCEPTION
    WHEN OTHERS THEN
    Case SQLCODE
    When -30625 Then
    RetXML := '<Job>No Records Found</Job>';
    Else
    Raise;
    END CASE;
    end GetISRNumber;

    This link will be usefull
    for this problem
    http://www.oracle.com/technology/sample_code/tech/java/codesnippet/xmldb/HowToLoadLargeXML.html

  • Schema validation for XMLType Clob vs Binary

    Hi
    Whilst looking at 11g R2 for use in validating XML against schemas, I have noticed that validation of XML using xmlDoc.schemavalidate() on a XMLType of CLOB would appear to be using a different schema validation process to validating by inserting into a column of XMLType of Binary.
    A couple of things that drew my attention to this is 1) the slight difference in error message format , and 2) the fact that the validation for the Binary XMLType was detecting an error with a date format whilst validation of the CLOB wasn't.
    Can anyone recommend which is the more thorough / robust of two ways to validate against a schema.
    Many Thanks
    Lawrence

    You'll find the {forum:id=34} forum the more appropriate location for this question. Include all 4 digits of your version and if possible a short script that shows the issue you found.
    Look in the [url https://wikis.oracle.com/display/Forums/Forums+FAQ]FAQ for how to use the tag to wrap your sample code and retain formatting when posting.  This would include how the schema is registered (I'm assuming you did at least).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Query or procedure reformatting xmltype (clob)

    help me out with this one, please. I have not been able to narrow it down:
    platform: Ora 9.2.0.5 on AIX, accessed remotely, character set AL32UTF8.
    Table with multiple of columns, 2 SYS.XMLTYPE columns (storage CLOB, not compiled schema (xsd:datetime timezone issues)).
    One column is a digitally signed xml doc; must be image consistent (char for char).
    test 1:
    select digitalsignedxml from table where ....;
    result is identical to input; life is good.
    test 2:
    select XMLeleement("digitallysigneddoc", digitallysignedxml) from table where ....;
    the body is still identical to the input (ignoring the wrapper), life is good.
    test3:
    same query as 2, but in a packaged function that is returning XMLTYPE.
    The body is not identical, but reformatted. sigh. life is not good.
    I have not been able to pin (narrow) this down. I have verified identical, not identical using sqlplus (set long 20000 linesize 20000 header off) and with the team's java application.
    ???

    The problem appears to be that "SELECT xmltype_column" from table (XMLTYPE on clob) returns the data as is with no reformatting, and "SELECT XML("wrapper", xmltype_column) from table will totally reformat the xml in the column. Even though the data is stored in CLOB, it is no longer image consistent. yeah, it is still DOM consistent, but if we are dealing with a digitally signed doc, then how can I include that digitally signed doc in a larger XML doc, and still have it valid?
    here are teh test cases:
    REM for posting purposes I put ";" at all eol (if not already there).
    environment: server 9.2.0.5 on AIX
    client: sqlplus 9.2.0.5.0 also on AIX (remote, not ORACLE_SID)
    set long 20000 linesize 20000 heading off
    def vxml1='<testDoc id="6734"> <authSignature><ds:Signature xmlns:ds="http://www
    .w3.org/2000/09/xmldsig#"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="h
    ttp://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>';
    def vxml2='<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-
    sha1"/><ds:Reference URI="testDoc"><ds:Transforms><ds:Transform Algorithm="http:
    //www.w3.org/TR/2001/REC-xml-c14n-20010315"/>';
    def vxml3='</ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09
    /xmldsig#sha1"/><ds:DigestValue>00OrCVzig5V9p5SLbjDXbryYZkQ=</ds:DigestValue></d
    s:Reference></ds:SignedInfo>';
    def vxml4='<ds:SignatureValue>foo</ds:SignatureValue><ds:KeyInfo><ds:KeyName>Pub
    lic key of certificate</ds:KeyName><ds:KeyValue><ds:RSAKeyValue>';
    def vxml5='<ds:Modulus>bar</ds:Modulus><ds:Exponent>AQAB</ds:Exponent></ds:RSAKe
    yValue></ds:KeyValue><ds:X509Data>';
    def vxml6='<ds:X509Certificate>data here</ds:X509Certificate></ds:X509Data></ds:
    KeyInfo></ds:Signature></authSignature></testDoc>';
    select xmltype('&vxml1.&vxml2.&vxml3.&vxml4.&vxml5.&vxml6') from dual;
    select XMLelement("testdoc",xmltype('&vxml1.&vxml2.&vxml3.&vxml4.&vxml5.&vxml6')
    ) from dual;
    results:
    15:25:43 dev58 SQL> select xmltype('&vxml1.&vxml2.&vxml3.&vxml4.&vxml5.&vxml6') from dual;
    <testDoc id="6734"> <authSignature><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><ds:Reference URI="testDoc"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><ds:DigestValue>00OrCVzig5V9p5SLbjDXbryYZkQ=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>foo</ds:SignatureValue><ds:KeyInfo><ds:KeyName>Public key of certificate</ds:KeyName><ds:KeyValue><ds:RSAKeyValue><ds:Modulus>bar</ds:Modulus><ds:Exponent>AQAB</ds:Exponent></ds:RSAKeyValue></ds:KeyValue><ds:X509Data><ds:X509Certificate>data here</ds:X509Certificate></ds:X509Data></ds:KeyInfo></ds:Signature></authSignature></testDoc>
    1 row selected.
    Elapsed: 00:00:00.01
    15:25:43 dev58 SQL>
    15:25:43 dev58 SQL> select XMLelement("testdoc",xmltype('&vxml1.&vxml2.&vxml3.&vxml4.&vxml5.&vxml6')) from dual;
    <testdoc><testDoc id="6734">
    <authSignature>
    <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
    <ds:SignedInfo>
    <ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
    <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
    <ds:Reference URI="testDoc">
    <ds:Transforms>
    <ds:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
    </ds:Transforms>
    <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
    <ds:DigestValue>00OrCVzig5V9p5SLbjDXbryYZkQ=</ds:DigestValue>
    </ds:Reference>
    </ds:SignedInfo>
    <ds:SignatureValue>foo</ds:SignatureValue>
    <ds:KeyInfo>
    <ds:KeyName>Public key of certificate</ds:KeyName>
    <ds:KeyValue>
    <ds:RSAKeyValue>
    <ds:Modulus>bar</ds:Modulus>
    <ds:Exponent>AQAB</ds:Exponent>
    </ds:RSAKeyValue>
    </ds:KeyValue>
    <ds:X509Data>
    <ds:X509Certificate>data here</ds:X509Certificate>
    </ds:X509Data>
    </ds:KeyInfo>
    </ds:Signature>
    </authSignature>
    </testDoc>
    </testdoc>
    1 row selected.
    Elapsed: 00:00:00.04
    REM REM hint: this is much stripped down bare bones of actual digitial signed xml doc ...

  • XML, XMLType, Clob???

    Hi,
    In our system we need to interface with an external system using an xml interface. We use a staging table that contains the data that is needed to collect data from our database. For this we used the xmlelement en xmlagg query in a stored procedure into a clob parameter. We are using ODP.net driver 9207.
    We query chunks of 100 records from our staging table and retrieve the xml data calling our stored procedure. This will run ok for a while but after an unpredictable amount of time we got ORA-03127: no new operations allowed until the active operation ends.
    We switched to an xmltype parameter, that seemed to solve that error. But now after app. 500 successful attempts our .net application crashes. We have correct error handling implemented but it does not even get there. I read about leaking xmltype later on, but I'm not sure if this could be the case. It is running on a server as a windows service.
    The strange thing is that the exact same code runs fine on my machine (the famous last words....), same odp.net driver version, against the same database...
    Well, we just want xml out of this Oracle database, calling a stored procedure and getting desperate....
    Any advice?
    Best regards,
    Richard

    I found it!
    After going through some posts on this forum, I found an example of the ODP.net team how to use xmltype.
    It is crucial to call the dispose method of your parameters, yep I should have thought of that!.
    We populated a parametercollection in our data access assembly to return to the client, but failed to dispose the parameter we retrieved the data from.
    The explanation for the process not crashing on my laptop vs the service on a server could be that the server has 4 processors and is much faster. The .net garbage collector might not have been able to clear our objects?
    Oh well, perhaps some unlucky wandering soul with xmltype problems reads this and can use this stuff ;-)
    Richard

  • XMLTYPE+CLOB BIG TROUBLE

    Following snippet ends with exception
    Data provider internal error(-3001)
    using( OracleConnection conn= new OracleConnection( "...")){
    conn.Open();
    OracleCommand cmd= new OracleCommand( "select xmlelement(...) test from test_tbl", conn);
    OracleDataReader rx= cmd.ExecuteReader();
    if( rx.Read()){
    OracleClob clb= rx.GetOracleClob(0);//this code throws exception
    }else{
    throw new ApplicationException( "No rows found");
    rx.Close();
    What it means and what I can do?
    Thanks in advice.

    Can you describe shortly that the "abstract" CLOB
    is and how I can do "normal" CLOB from it?
    By the way, Microsoft Oracle provider seems to
    work with small clobs even with xmlelement()
    but fail with "large" ones- it simply returns empty
    Reader. In the same time Microsoft provider correctly
    handle "large" CLOBs directly from table.So, as workaround I've tried to create a function,something like:
    create function test_clob return clob as
    xx clob;
    begin
    select xmlelement().getclobval() into xx ...;
    -- select length ~2kb ;-)
    return xx;
    end;
    and on client side:
    select test_clob() from dual;
    What's work(from Microsoft provider)!
    Hope this helps.

  • XQuery for (CLOB)-XMLType

    I would like to know whether XQuery is supporting XMLType (CLOB).
    It seems to be possible to apply XQuery on a sqlquery by using the command sqlquery(..) according to FOR $b IN sqlquery(..)
    This however throws a parsing excpetion when I use an sql-query that contains the extract statement which is used for CLOBs
    Please help !
    Below a piece of code that is not running..
    FOR $b IN sqlquery("select extract( doc,'/MeasurementSystems/' ).getStringVal() from V34_6jisno7sf3ksve4m5pabk33h1b X")/MeasurementSystems/MeasurementSeries/*

    Marcel,
    Does the extract work outside of the sqlquery and FOR loop?

  • XPath query works with CLOB but not with object relational

    hi all
    i have the following queries,the XQuery work with all, but XPath queries work with XMLType CLOB and Binary XML, but they do not work with XMLType as Object relational,
    select extract (object_value,'movies/directorfilms/films/film [studios/studio = "Gaumont"]')
    from xorm;
    select extract (object_value,'movies/directorfilms[director/dirname = "L.Cohen"]/films/film[position()=2]/t')
    from xorm;
    they shows this message
    ORA-00932: inconsistent datatypes: expectd SYSTEM.name683_COLL got CHAR
    thanks

    Hi Marco
    fisrt here is my RO
    BEGIN
    DBMS_XMLSCHEMA.registerSchema(
    SCHEMAURL=>'http://......../ORMovies.xsd',
    SCHEMADOC=>bfilename('DB','Movies.xsd'),
    LOCAL =>false,
    GENTYPES=>true,
    GENTABLES=>FALSE,
    CSID=>nls_charset_id('AL32UTF8'));
    END;
    create table XORM of xmltype
    xmltype store as object relational
    XMLSCHEMA "http://......../ORMovies.xsd"
    ELEMENT "movies";
    INSERT INTO XORM
    VALUES(XMLType(BFILENAME('DB','ORMovies.xml'),nls_charset_id('AL32UTF8')));
    here the XQuery format that work fine with the OR
    A/D
    select XMLQuery ('for $a in movies/directorfilms/films/film
              where $a/studios/studio = "Gaumont"
              return $a'
         passing object_value
         returning CONTENT)"TitleX"
    from xorm;
    child element query
    select XMLQuery ('for $a in movies/directorfilms/director[dirname = "Feyder"]
              let $b:=$a/../films/film[position()=2]
              return $b/t'
         passing object_value
         returning CONTENT)"TitleX"
    from xorm;
    here is the XPath format which doesn't work
    select extract (object_value,'movies/directorfilms/films/film [studios/studio = "Gaumont"]')
    from xorm;
    select extract (object_value,'movies/directorfilms[director/dirname = "Feyder"]/films/film[position()=2]/t')
    from xorm;
    by the way all queries work fine with the CLOB or Binary XML
    many thanx Marco

  • Xmltype data can't be copied from remote database

    Hi,
    I got the following same error when copy table with xmltype from different env:
    table localXML(xml xmltype);
    insert into localXML select * from remoteXML@romote;
    1. run from db tools:
    ... Physical database connection acquired for: local
    12:07:41 [INSERT - 0 row(s), 0.000 secs] [Error Code: 22992, SQL State: 99999] ORA-22992: cannot use LOB locators selected from remote tables
    ... 1 statement(s) executed, 0 row(s) affected, exec/fetch time: 0.000/0.000 sec [0 successful, 0 warnings, 1 errors]
    2. run from sqlplus
    ORA-22992: cannot use LOB locators selected from remote tables
    The above script runs well if two tables are in same database.
    Did any one have solution on this?
    Thanks.
    John

    The standard workaround for this one is to create a synonym or such on the be called object and then do the insert selecting via the synonym. Search google for ORA-22992 and "asktom" and see if this workaround for LOB's also works for xmltype (CLOB) columns/tables.
    What's your database version and how was the remoteXML table created (DDL) ???

  • 32k Rowsize Limit (ORA-006502) for Report Query Shared Objects in Apex 4.1

    We're trying to move legacy reports off of PlanetPress into Apex. One of the report queries has over 20 tables and attempting to run with the "Test Report" button in the Edit Report Query screen gets the error message:
    Error ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    This problem appears to have been characterized previously here:
    Listener Error - character string buffer too small (ORA-06502)
    If I comment out 13 lines/items in my SELECT clause, the Test Report runs okay. If I add back in an innocuous literal sellect of a 100-character string, it goes back to the 6502 error.
    I was trying to add more literal strings to force APEX to shift internally from a 32k-limit to a CLOB for the row, however, with a 32k literal string in my SQL statement, APEX crashes. I can't strip out columns from my SQL as all are needed for the report.
    I would very much appreciate a work-around or a patch to Apex 4.1 to address this limitation. Thank you.

    Try moving some of your select logic into a view, thus you can select from the views and reduce your code... (Move the joining between tables and such to the view..)
    Thank you,
    Tony Miller
    Webster, TX

  • Extracting xmldata from clob field in oracle

    I have an xml document stored in xmltype (clob)field in oracle
    Below is the xml data inside the xml ( I have kind of 300 elements similar to this inside the xml)
    <ns1:E-I12_IS_13 ObjID="I12" ObjType="e">5437090</ns1:E-I12_IS_13>
    <ns1:E-I13_IS_14 ObjID="I13" ObjType="e">5</ns1:E-I13_IS_14>
    <ns1:E-I14_IS_15 ObjID="I14" ObjType="e">9</ns1:E-I14_IS_15>
    The requirement is to get all the elements from the xmldata and compare against the 15-16 oracle tables ( here xml is converted and stored in these tables by a tibco process)
    select dbms_lob.instr(clobcolumnname,'E-I13_IS_14') from tablename  where  ( given condition to extract specific transaction)
    the above statement gives me position of the string
    select dbms_lob.substr(clobcolumnname,6( length of element value),870(position from where the value starts)) from tablename where  condition
    the abv statement gives me the element value
    but I want to extract the value for  any element by giving the element name ( if u see any value comes after objtype="e"  between > and < tags)
    can anyone on this forum tell me to extract the element value just by giving element name ( since I have to do the same for n number of elements - how to find position of > and < tags??)

    Hi Odie,
    Good afternoon. I am not getting any help to solve my xmltable issues.
    <MeterTransaction xmlns:CorralClub="http://webservice.hlsr.net/CorralClubService/">
      <TransactionID>1100</TransactionID>
      <Club_Number>CN001</Club_Number>
      <Club_Activity_ID>0</Club_Activity_ID>
      <Transaction_Date>2014-01-29T00:00:00-06:00</Transaction_Date>
      <Creation_Date>2014-01-29T00:00:00-06:00</Creation_Date>
      <User_ID>1766</User_ID>
      <Status />
      <TicketCount>0</TicketCount>
      <Usage>0</Usage>
      <BadPulls>0</BadPulls>
      <Discrepancy>0</Discrepancy>
      <Percent>0</Percent>
      <Comments />
      <Readings>
         ********** Can be disregarded ******************
            <xs:schema id="ClubMeter" targetNamespace="http://tempuri.org/ClubMeter.xsd" xmlns:mstns="http://tempuri.org/ClubMeter.xsd" xmlns="http://tempuri.org/ClubMeter.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-               com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
                        ****** Some other elements
              </xs:schema>
          *********** End of Can be disregarded ******************
        <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
          <ClubMeter xmlns="http://tempuri.org/ClubMeter.xsd">
            <MeterBar diffgr:id="MeterBar1" msdata:rowOrder="0" diffgr:hasChanges="modified">
              <Club_Number>CN001</Club_Number>
              <Bar_Number>BBS01</Bar_Number>
              <TicketCount>111</TicketCount>
              <Usage>88</Usage>
              <BadPulls>15</BadPulls>
              <Discrepancy>8</Discrepancy>
              <Percent>0.0720720720720721</Percent>
              <DISPLAY>BEER - BBS01</DISPLAY>
            </MeterBar>
            <MeterBar diffgr:id="MeterBar2" msdata:rowOrder="1" diffgr:hasChanges="modified">
              <Club_Number>CN001</Club_Number>
              <Bar_Number>BBS02</Bar_Number>
              <DISPLAY>BEER - BBS02</DISPLAY>
            </MeterBar>
            <MeterReading diffgr:id="MeterReading16" msdata:rowOrder="15" diffgr:hasChanges="modified">
              <Club_Number>CN001</Club_Number>
              <Bar_Number>BBS01</Bar_Number>
              <Position>11</Position>
              <Inventory_Item_ID>12906</Inventory_Item_ID>
              <Product_Class>SOFT-GOODS</Product_Class>
              <Product_Type>SOFT DRINK</Product_Type>
              <Product_Name>Full Throttle Coca Cola</Product_Name>
              <Open>6</Open>
              <Add1>11</Add1>
              <Close>1</Close>
              <Usage>16</Usage>
            </MeterReading>
            <MeterReading diffgr:id="MeterReading96" msdata:rowOrder="95" diffgr:hasChanges="modified">
              <Club_Number>CN001</Club_Number>
              <Bar_Number>BBS01</Bar_Number>
              <Position>10</Position>
              <Inventory_Item_ID>2188</Inventory_Item_ID>
              <Product_Class>BEER</Product_Class>
              <Product_Type>DOMESTIC</Product_Type>
              <Product_Name>Lone Star Regular</Product_Name>
              <Open>6</Open>
              <Add1>2</Add1>
              <Close>1</Close>
              <BadPulls>3</BadPulls>
              <Usage>4</Usage>
            </MeterReading>
            <MeterReading diffgr:id="MeterReading17" msdata:rowOrder="16" diffgr:hasChanges="modified">
              <Club_Number>CN001</Club_Number>
              <Bar_Number>BBS02</Bar_Number>
              <Position>11</Position>
              <Inventory_Item_ID>12906</Inventory_Item_ID>
              <Product_Class>SOFT-GOODS</Product_Class>
              <Product_Type>SOFT DRINK</Product_Type>
              <Product_Name>Full Throttle Coca Cola</Product_Name>
            </MeterReading>
            <MeterReading diffgr:id="MeterReading97" msdata:rowOrder="96" diffgr:hasChanges="modified">
              <Club_Number>CN001</Club_Number>
              <Bar_Number>BBS02</Bar_Number>
              <Position>10</Position>
              <Inventory_Item_ID>2188</Inventory_Item_ID>
              <Product_Class>BEER</Product_Class>
              <Product_Type>DOMESTIC</Product_Type>
              <Product_Name>Lone Star Regular</Product_Name>
            </MeterReading>
          </ClubMeter>
          <diffgr:before>
            <MeterBar xmlns="http://tempuri.org/ClubMeter.xsd" diffgr:id="MeterBar1" msdata:rowOrder="0">
              <Bar_Number>BBS01</Bar_Number>
              <DISPLAY>BEER - BBS01</DISPLAY>
            </MeterBar>
            <MeterBar xmlns="http://tempuri.org/ClubMeter.xsd" diffgr:id="MeterBar2" msdata:rowOrder="1">
              <Bar_Number>BBS02</Bar_Number>
              <DISPLAY>BEER - BBS02</DISPLAY>
            </MeterBar>
            <MeterReading xmlns="http://tempuri.org/ClubMeter.xsd" diffgr:id="MeterReading16" msdata:rowOrder="15">
              <Bar_Number>BBS01</Bar_Number>
              <Position>11</Position>
              <Inventory_Item_ID>12906</Inventory_Item_ID>
              <Product_Class>SOFT-GOODS</Product_Class>
              <Product_Type>SOFT DRINK</Product_Type>
              <Product_Name>Full Throttle Coca Cola</Product_Name>
            </MeterReading>
            <MeterReading xmlns="http://tempuri.org/ClubMeter.xsd" diffgr:id="MeterReading96" msdata:rowOrder="95">
              <Bar_Number>BBS01</Bar_Number>
              <Position>10</Position>
              <Inventory_Item_ID>2188</Inventory_Item_ID>
              <Product_Class>BEER</Product_Class>
              <Product_Type>DOMESTIC</Product_Type>
              <Product_Name>Lone Star Regular</Product_Name>
            </MeterReading>
            <MeterReading xmlns="http://tempuri.org/ClubMeter.xsd" diffgr:id="MeterReading17" msdata:rowOrder="16">
              <Bar_Number>BBS02</Bar_Number>
              <Position>11</Position>
              <Inventory_Item_ID>12906</Inventory_Item_ID>
              <Product_Class>SOFT-GOODS</Product_Class>
              <Product_Type>SOFT DRINK</Product_Type>
              <Product_Name>Full Throttle Coca Cola</Product_Name>
            </MeterReading>
            <MeterReading xmlns="http://tempuri.org/ClubMeter.xsd" diffgr:id="MeterReading97" msdata:rowOrder="96">
              <Bar_Number>BBS02</Bar_Number>
              <Position>10</Position>
              <Inventory_Item_ID>2188</Inventory_Item_ID>
              <Product_Class>BEER</Product_Class>
              <Product_Type>DOMESTIC</Product_Type>
              <Product_Name>Lone Star Regular</Product_Name>
            </MeterReading>
          </diffgr:before>
        </diffgr:diffgram>
      </Readings>
    </MeterTransaction>
    From the above abbreviated XML document, how do I get the values from the nodes of MeterBar and MeterReading nodes?
    I really appreciate your help in this regard.
    Thanks,
    Bidhan

  • Increase the character value of CLOB

    Hi,
    I am working in oracle9i and linux 2.4 .In that for a column i used CLOB datatype .But if i give more than 4000 characters it will not inserted. when i open the table and see means it doesnt show the value of CLOB datatype.Please tell me how to increase the size of CLOB datatype upto the maximum level of 4gb.
    please send me the sql query .
    immm
    Regards,
    Gobi.

    You can't specify a limit for a CLOB. A CLOB will always support multiple GB of data. A CLOB will never be limited to 4000 bytes. If you are seeing a 4000 byte limitation, that is most likely a problem in your code.
    Adding space to a tablespace requires adding space to an existing data file or adding a new data file to a tablespace. That doesn't sound like what you're trying to do here.
    Justin

  • Architecture Advice - XMLTYPE, VPD, PL

    Hi, apologies if this is off-topic but wasn't sure which forum to pick for general architecture questions...
    I've inherited an existing application architecture that we're struggling to scale beyond about 100 concurrent users on small-scale hardware, and would appreciate any advice.
    It is a 3-tier web application, using XMLTYPE (CLOB), VPD and with the vast majority of the business logic and workflow coded in PL/SQL.
    We're experiencing that the CLOB-based XMLTYPE columns very quickly eat up all available CPU, and our very complex VPD policies tends to slow tables down about 300% above a few thousand rows. Since the data is directly updated in PL/SQL our middle tier (java) can't cache anything.
    The expectation is that this architecture should scale to thousands of concurrent users, with reasonablly large data volumes, on relatively small scale (e.g. 2 or 4 CPU) h/w. Our market cannot really afford/have the expertise to use additional Oracle products such as Grid, Partitioning, RAC etc.
    I'm not sure where to start - we've tried tuning individual queries but I think we'll need more than that. We're using the latest edition of 10g RDBMS.

    I've used a temporary table the way you propose, and it works pretty well. I override a method of my View Object (executeQuery, I think) to call some PL/SQL to load the temporary table before executing the query. Performance is not quite as good, but isn't a show stopper. My particular application was using a read-only VO, with no underlying Entity Object, but I think you could override an EO method to call some PL/SQL to use data from the temporary table to update the real tables.
    I've looked at the original version of Avrom Roy-Faderman's framework extension, but I know he substantially revised it since I looked. It is a cool use of the extensible nature of the ADF BC framework. Avrom has placed the framework in samplecode.oracle.com, and now someone else is leading the project.
    This should work well for PL/SQL APIs that have only database native types as parameters to the procedures. But it has the same problems as I mentioned before with PL/SQL records and collections, unless you first make them into database object types with CREATE TYPE.
    I have also used the JPublisher interface of JDev. This is pretty neat and it can do the CREATE TYPE commands for you and write conversions to and from PL/SQL types. It also generates A LOT of Java code - the problem with it is that as a code generator it has to generate much more code than you would if you wrote it by hand to handle cases that you know won't occur with your data. And the code it writes can be hard to read and maintain. The classes it writes can be integrated into ADF BC objects, but it still is going to need some hand coding to do the job. Or some people abandon ADF BC, and use these as POJOs which can be made into Data Controls.

  • Xmltype error in trigger

    Hi,
    I try to use xmltype to convert a clob field into xmltype as below
    create or replace trigger BI_CUST_TEST_LOG_TEST
      before insert on cust_test_log 
      for each row
    declare
      vlog xmltype;
    begin
    vlog := xmltype(:new.test_log_text);
    end BI_CUST_TEST_LOG_TEST;but when I insert data into the table, the error
    ORA-00942: table or view does not exist
    ORA-06512: at "sys.xmltype',line 254
    is there any limitation using xmltype in trigger?
    p.s.
    I am user 10g R2 10.2.0.4

    I have no idea what you are trying to do and it looks "strange" to me regarding use of triggers (if not only using triggers to start with)...
    Anyway, I tried the following with a user account that has the CONNECT and RESOURCE role on a Oracle 10.2.0.2 (EE) database... everything works fine...
    drop table t purge;
    create table t ( x xmltype
                   , c CLOB);
    declare
    v_XMLVal  XMLTYPE := xmltype('<xmltype/>');
    v_CLOBVal CLOB    := xmltype('<clob/>').getCLOBVal();
    begin
    INSERT INTO T
      ( X
      , C
      VALUES
      ( v_XMLVal
      , v_CLOBVal
    end;
    select x as "XMLTYPE",
           c as "CLOB"
    from t;
    create or replace trigger trig_t
      before insert on T 
      for each row
    declare
      v_XMLVal xmltype;
    begin
    v_XMLVal := xmltype(:new.c);
    end trig_t;
    declare
    v_CLOBVal CLOB    := xmltype('<clob/>').getCLOBVal();
    begin
    INSERT INTO T
      ( C
      VALUES
      ( v_CLOBVal
    end;
    select x as "XMLTYPE",
           c as "CLOB"
    from t;
    create or replace trigger trig_t
      before insert on T 
      for each row
    declare
      v_XMLVal xmltype;
    begin
    v_XMLVal := xmltype(:new.c);
    :new.x := v_XMLVal;
    end trig_t;
    declare
    v_XMLVal  XMLTYPE := xmltype('<xmltype/>');
    v_CLOBVal CLOB    := xmltype('<clob/>').getCLOBVal();
    begin
    INSERT INTO T
      ( X
      , C
      VALUES
      ( v_XMLVal
      , v_CLOBVal
    end;
    select x as "XMLTYPE",
           c as "CLOB"
    from t;

  • Using extractvalue with XMLTYPE to extract multiple nodes

    hi ,
    I'm trying to fetch data from xml which is stored as clob in db (10g) ,
    when i tried to fetch with query as below
    SELECT extractvalue(XMLTYPE(xjm.X_MSG_XML), '//orderRequest/order/orderItem/alternativeIdentifer/value') uiid
    FROM TABLE_X_MSG_ATTR xma, TABLE_X_JMS_MSG xjm
    WHERE xma.X_MSG_ATTR2X_JMS_MSG=xjm.OBJID
    AND xma.X_ATTR_NAME='MOP_ID'
    AND xma.X_ATTR_VALUE in ('RJM78999')
    and got **ORA-19025: EXTRACTVALUE returns value of only one node**
    so i modified it as below
    SELECT extractvalue(value(x), '//orderRequest/order/orderItem/alternativeIdentifer/value') uiid
    FROM TABLE_X_MSG_ATTR xma, TABLE_X_JMS_MSG xjm
    ,TABLE(XMLSequence(extractvalue(XMLTYPE(xjm.X_MSG_XML),'//orderRequest/order/orderItem/alternativeIdentifer/value'))) x
    WHERE xma.X_MSG_ATTR2X_JMS_MSG=xjm.OBJID
    AND xma.X_ATTR_NAME='MOP_ID'
    AND xma.X_ATTR_VALUE in ('RJM78999')
    ORA-29900: operator binding does not exist
    ORA-06553: PLS-306: wrong number or types of arguments in call to 'XMLSEQUENCE'
    no success :( it is working for single record (node)all perfect
    Thnkz
    Edited by: Volution2111 on Sep 11, 2010 5:08 AM
    Edited by: Volution2111 on Sep 11, 2010 5:10 AM

    Difficult to give the exact answer without knowing which node repeats..
    Howver it will be something like this
    select extractValue(value(x),'/RepeatingNode/NonRepatingNode/NonRepeatingNode)
      from TABLE, table(xmlsequence(extract(xmltype(clob),'/Root/Node/RepeatingNode')))) x

Maybe you are looking for

  • How to find the data loaded from r/3 to bw

    hi how to find the data loaded from r/3 to bw is correct . i am not able to find which feild in the query is connected to which feild in the r/3 . where i am geting the data from r/3 . is there any process to find which feild  and table the data is c

  • When I try to play a video(any video)the screen turns green and then shows a distorted picture

    When I try to play a video(any video)the screen turns green &plays a very distorted picture picture.

  • Reg: ME21 Purchase Order Creation BDC Codes

    Hi All, Ritenow Im working with ME21 purchase order creation, i have to create a upload program for this past twodays im geting hectic with this prog, if i create a prog using me21n transaction it is not running, and in ME21 i cant record in SHDB( it

  • Exception 'NOT_ALLOWED'.

    Hi, I wrote 'COM_PARTNER_BADI' so stop creating orders against a PROSPECT. When a user enters a PROSPECT in standard order i am prompting the user saying 'Orders cannot be created against PROSPECT' in the status bar thru this BADI. It is working fine

  • Thinkvantage Toolbox Reports Battery Not Installed

    Hi All, I'm having a problem with ThinkVantage Toolbox. I keep getting an error that my battery is not installed even though Lenovo power manager 3 shows it as installed and in good condition. I've run all updates from system update 4 but it didn't r