XML Query on a CLOB Column

I am trying to query a column which is of CLOB data type,in Oracle, and My Data is stored something like this
<Result><Institution>XXX</Institution><Application>XXX</Application><ID>123123123</ID><SequenceID>MSGID123123</SequenceID><DateTime></DateTime></Result>
I am trying to run the xquery on this like this
SELECT Message FROM LOGS
('for $i in ora:view("LOGS")
where $i/Result/Institution/ = 'XXX'
return $i/Result/Institution/
PASSING :Institution AS 'XXX').
I either get exception that "missing right parenthesis" or doesnt execute at all.
My Table "LOGS" as the Columns Message as CLOB.
Any Ideas how to query on this kind of columns in a table in Oracle using XQuery?
Cheers
Sridhar

Hi,
First of all, please always give your database version (all digits from "select * from v$version").
Oracle XML support is achieved through the XMLType datatype, so you must first convert any string variable (CLOB, VARCHAR2) holding XML data to that type in order to use XML-related functions.
Now, to the point, if you want to check the existence of a particular node, you can try the following :
-- if Institution may occur multiple times :
select message
from logs
where existsnode(xmltype(message), '/Result[Institution="'||:p_institution||'"]') = 1
-- if only one Institution element is expected :
select message
from logs
where extractvalue(xmltype(message), '/Result/Institution') = :p_institution
;And the 11g equivalent :
select message
from logs
where xmlexists('$d/Result[Institution=$p]' passing xmltype(message) as "d", :p_institution as "p")
select message
from logs
where xmlcast(
        xmlquery('$d/Result/Institution' passing xmltype(message) as "d" returning content)
        as varchar2(30)
      ) = :p_institution
;

Similar Messages

  • How to insert more than 32k xml data into oracle clob column

    how to insert more than 32k xml data into oracle clob column.
    xml data is coming from java front end
    if we cannot use clob than what are the different options available

    Are you facing any issue with my code?
    String lateral size error will come when you try to insert the full xml in string format.
    public static boolean writeCLOBData(String tableName, String id, String columnName, String strContents) throws DataAccessException{
      boolean isUpdated = true;
      Connection connection = null;
      try {
      connection = ConnectionManager.getConnection ();
      //connection.setAutoCommit ( false );
      PreparedStatement PREPARE_STATEMENT = null;
      String sqlQuery = "UPDATE " + tableName + " SET " + columnName + "  = ?  WHERE ID =" + id;
      PREPARE_STATEMENT = connection.prepareStatement ( sqlQuery );
      // converting string to reader stream
      Reader reader = new StringReader ( strContents );
      PREPARE_STATEMENT.setClob ( 1, reader );
      // return false after updating the clob data to DB
      isUpdated = PREPARE_STATEMENT.execute ();
      PREPARE_STATEMENT.close ();
      } catch ( SQLException e ) {
      e.printStackTrace ();
      finally{
      return isUpdated;
    Try this JAVA code.

  • Update XML data stored in CLOB Column

    Hi All,
    i am new to Oracle and new to SQL
    i am trying to update XML data stored in CLOB cloumn,data is stored with the follwoing format
    <attrs><attr name="name"><string>Schade</string></attr></attrs>
    i am using the following query for updating the value
    UPDATE PRODUCT p SET ATTRIBUTES_nl_nl=UPDATEXML(XMLTYPE.createXML(ATTRIBUTES_nl_nl),'/attrs/attr[@name="name"]/string/text()','Schade').getClobVal() WHERE p.sku='000000000000040576_200911-5010057'
    this query is working fine but it changing the data to the following format
    <attrs><attr name="name">Schade</attr></attrs>
    some how it is ommiting the <string> tag from it, i am unable to figure it out whats the reason.
    any help in this regard will b e much appriciated
    Thanks in Advance
    -Umesh

    Hi,
    You should have created your own thread for this, and included database version.
    This works for me on 11.2.0.2 and 10.2.0.5 :
    SQL> create table t_org ( xml_clob clob );
    Table created
    SQL>
    SQL> insert into t_org
      2  values(
      3  '<Message>
      4  <Entity>
      5  <ASSIGNMENT>
      6  <OAVendorLocation> </OAVendorLocation>
      7  <Vendorid>1</Vendorid>
      8  </ASSIGNMENT>
      9  </Entity>
    10  </Message>'
    11  );
    1 row inserted
    SQL> commit;
    Commit complete
    SQL> select '*' ||
      2         extractvalue(xmltype(xml_clob),'/Message/Entity/ASSIGNMENT/OAVendorLocation')
      3         || '*' as result
      4  from t_org;
    RESULT
    SQL> update t_org set xml_clob =
      2  updatexml(xmltype(xml_clob),
      3  '/Message/Entity/ASSIGNMENT/OAVendorLocation/text()','LONDON').getClobVal()
      4  ;
    1 row updated
    SQL> select '*' ||
      2         extractvalue(xmltype(xml_clob),'/Message/Entity/ASSIGNMENT/OAVendorLocation')
      3         || '*' as result
      4  from t_org;
    RESULT
    *LONDON*
    Does the OAVendorLocation really have a whitespace value?
    If not then it's expected behaviour, you're trying to update a text() node that doesn't exist. In this case, the solution is to use appendChildXML to create the text() node, or update the whole element.
    Is it your real document? Do you actually have some namespaces?

  • Trying to Insert an XML Element into XML data stored in CLOB column

    Hi all,
    My ORACLE DB version is:
    ('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 - Production');
    I have this XML data stored in a CLOB column:
    <Activity>
         <Changes>     
         </Changes>
         <Inserts>     
         </Inserts>
         <Definition>     
         </Definition>
         <Assignment TYPE="Apply">     
         </Assignment>
         <Spawned>
              <Activity>576D8CD9-57A1-8608-1563-8F6DC74BDF3C</Activity>
              <Activity>11226E79-5D24-02EB-A950-D34A9CCFB3FF</Activity>
              <Activity>DAA68DC0-CA9A-BB15-DE31-9596E19513EE</Activity>
              <Activity>93F667D6-966A-7EAD-9B70-630D9BEFDDD2</Activity>
              <Activity>FA63D9D3-86BB-3FF0-BE69-17EAA7581637</Activity>
         </Spawned>
         <SpawnedBy>AFC49BD4-5AA7-38C0-AE27-F59D16EE1B1C</SpawnedBy>
    </Activity>
    I am in need of some assistance in creating an update that will insert another <Activity>SomeGUID</Activity> into the <Spawned> parent.
    Any help is greatly appreciated.
    Thanks.
    Edited by: 943783 on Dec 14, 2012 12:58 PM

    See XML updating functions : http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb04cre.htm#i1032611
    For example :
    UPDATE my_table t
    SET t.my_clob =
          XMLSerialize(document
            insertChildXML(
              XMLParse(document t.my_clob)
            , '/Activity/Spawned'
            , 'Activity'
            , XMLElement("Activity", 'Some GUID')
    WHERE ...
    ;Although it works, there's overhead introduced by parsing the CLOB, then serializing again.
    Is there any chance you can change the CLOB to SECUREFILE binary XMLType storage instead?
    You would then be able to benefit from optimized piecewise update of the XML and improved storage.

  • Loading xml metadata into a clob column

    Hi,
    how can i load metadata for a custom report(OIM) into rep_xml_meta column (clob type) of rep table?
    can the metadata be taken in the form of simple text file?

    Listen ! !
    It for sure gives you entire meta data content, I ran it 50 times at least. By the way, how are you trying to run that query. Use some standard tool like SQL Developer. It directly shows you the data without any query. Here is your meta data, modify it accordingly:
    <Report layout="Tabular">
    <StoredProcedure>
    <InputParameters>
    <InputParameter name="reportDateRange" parameterType="varchar2" order="1" fieldType="DateRange" fieldLabel="report.usersDisabled.label.reportDateRange" required="false">
    <InputStartDate name="dtstartdate_in" parameterType="varchar2" order="1" defaultValue="01/01/1900" format="reports.generic.message.internalDateFormat"/>
    <InputEndDate name="dtenddate_in" parameterType="varchar2" order="2" defaultValue="12/31/2049" format="reports.generic.message.internalDateFormat"/>
    </InputParameter>
    </InputParameters>
    </StoredProcedure>
    <ReturnColumns>
    <ReturnColumn name="FirstName" label="report.usersDisabled.label.firstName" display="true" position="Table" primarySort="false" filterColumn="false"/>
    <ReturnColumn name="LastName" label="report.usersDisabled.label.lastName" display="true" position="Table" primarySort="false" filterColumn="false"/>
    <ReturnColumn name="UserId" label="report.usersDisabled.label.userId" display="true" position="Table" primarySort="true" filterColumn="false"
    clickable="false">
    <Link href="manageUser.do" />
    <RequestParameters>
              <RequestParameter name="entityKey" column="User_Key" />
              <RequestParameter name="method" value="viewUserDetails" />
         </RequestParameters>
    </ReturnColumn>
    <ReturnColumn name="OrganizationName" label="report.usersDisabled.label.organizationName" display="true" position="Table" primarySort="false"
    filterColumn="true" filterColumnName="act.act_name" clickable="true" >
    <Link href="manageOrganization.do" />
                   <RequestParameters>
                        <RequestParameter name="entityKey" column="Org_Key" />
                        <RequestParameter name="method" value="viewOrganizationDetails" />
                   </RequestParameters>
    </ReturnColumn>
    <ReturnColumn name="Users.Status" label="report.usersDisabled.label.userStatus" display="true" position="Table" primarySort="false" filterColumn="false"
    filterColumnName="usr.usr_status" filterType="Combobox" filterLookupKey="Lookup.WebClient.Users.Status"/>
    <ReturnColumn name="Users.Role" label="report.usersDisabled.label.employeeType" display="true" position="Table" primarySort="false" filterColumn="false"
    filterColumnName="usr.usr_emp_type" filterType="Combobox" filterLookupKey="Lookup.Users.Role"/>
    <ReturnColumn name="ManagerId" label="report.usersDisabled.label.managerId" display="true" position="Table" primarySort="false" filterColumn="false" clickable="true">
    <Link href="manageUser.do" />
                        <RequestParameters>
                                  <RequestParameter name="entityKey" column="Manager_Key" />
                                  <RequestParameter name="method" value="viewUserDetails" />
                             </RequestParameters>
    </ReturnColumn>
    <ReturnColumn name="UsersGroups" label="report.usersDisabled.label.usersGroups" display="true" position="Table" primarySort="false" filterColumn="false"/>
    <ReturnColumn name="Resources" label="report.usersDisabled.label.resources" display="true" position="Table" primarySort="false" filterColumn="false"/>
    <ReturnColumn name="UserCreationSource" label="report.usersDisabled.label.userCreationSource" display="true" position="Table" primarySort="false" filterColumn="false"/>
    <ReturnColumn name="DisabledOn" label="report.usersDisabled.label.DisabledOn" display="true" position="Table" primarySort="false" filterColumn="false"/>
    </ReturnColumns>
    </Report>
    And for inserting again I will say use the tool SQL Developer Its pretty simple.
    Thanks
    Sunny

  • Query to find CLOB columns to cause xmltype nodes greater than 64 k error

    hi all,
    10G R2 - I have an NCLOB field which holds xml and I need to do some parsing on the column as an xmltype. So, I was wondering if anyone would know of a proper query to query that table for any rows where
    that nclob field will cause a > 64k node error when trying to parse the nclob field as xml (ie -> xmltype(nclobfield))
    thanks in advance! -- jp

    WHERE LENGTHB(nclob_column) < 64 * 1024Will return rows where NCLOB is less than 64K bytes.
    SY.

  • How to retreive soap xml data from clob column in a table

    Hi,
    I am trying to retrieve the XML tag value from clob column.
    Table name = xyz and column= abc (clob datatype)
    data stored in abc column is as below
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:head="http://www.abc.com/gcgi/shared/system/header" xmlns:v6="http://www.abc.com/gcgi/services/v6_0_0_0" xmlns:sys="http://www.abc.com/gcgi/shared/system/systemtypes">
    <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <RqHeader soapenv:mustUnderstand="0" xmlns="http://www.abc.com/gcgi/shared/system/header">
    <DateAndTimeStamp>2011-12-20T16:02:36.677+08:00</DateAndTimeStamp>
    <UUID>1000002932</UUID>
    <Version>6_0_0_0</Version>
    <ClientDetails>
    <Org>ABC</Org>
    <OrgUnit>ABC</OrgUnit>
    <ChannelID>HBK</ChannelID>
    <TerminalID>0000</TerminalID>
    <SrcCountryCode>SG</SrcCountryCode>
    <DestCountryCode>SG</DestCountryCode>
    <UserGroup>HBK</UserGroup>
    </ClientDetails>
    </RqHeader>
    <wsa:Action>/SvcImpl/bank/
    SOAPEndpoint/AlertsService.serviceagent/OpEndpointHTTP/AlertDeleteInq</wsa:Action></soapenv:Header>
    <soapenv:Body>
    <v6:AlertDeleteInqRq>
    <v6:Base>
    <v6:VID>20071209013112</v6:VID>
    <!--Optional:-->
    <v6:Ref>CTAA00000002644</v6:Ref>
    </v6:Base>
    </v6:AlertDeleteInqRq>
    </soapenv:Body>
    </soapenv:Envelope>
    And i want to retrieve the values of tag
    <ChannelID> and <v6:VID>
    can somebody help, i have tried with extractvalue but not able to get the values

    I have used the below two queries but not able to get the expected results. Both queries result into no values.
    select xmltype(MED_REQ_PAYLOAD).extract('//ClientDetails/Org','xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" || xmlns="http://www.abc.com/gcgi/shared/system/header"').getStringValue() from ESB_OUTPUT_TEMP where SOAPACTION = '/SvcImpl/bank/alerts/v6_0_0_0/SOAPEndpoint/AlertsService.serviceagent/OpEndpointHTTP/AlertDeleteInq'
    select EXTRACTVALUE(xmltype(MED_REQ_PAYLOAD),'/RqHeader/) from ESB_OUTPUT_TEMP where SOAPACTION = '/SvcImpl/bank/SOAPEndpoint/AlertsService.serviceagent/OpEndpointHTTP/AlertDeleteInq'
    Well, for starters, both queries are syntactically wrong :
    - non terminated string
    - incorrect namespace mapping declaration
    - unknown XMLType method "getStringValue()"
    Secondly, all those functions are deprecated now.
    Here's an up-to-date example using XMLTable. It will retrieve the two tag values you mentioned :
    SQL> select x.*
      2  from esb_output_temp t
      3     , xmltable(
      4         xmlnamespaces(
      5           'http://schemas.xmlsoap.org/soap/envelope/' as "soap"
      6         , 'http://www.abc.com/gcgi/shared/system/header' as "head"
      7         , 'http://www.abc.com/gcgi/services/v6_0_0_0' as "v6"
      8         )
      9       , '/soap:Envelope'
    10         passing xmlparse(document t.med_req_payload)
    11         columns ChannelID  varchar2(10) path 'soap:Header/head:RqHeader/head:ClientDetails/head:ChannelID'
    12               , VID        varchar2(30) path 'soap:Body/v6:AlertDeleteInqRq/v6:Base/v6:VID'
    13       ) x
    14  ;
    CHANNELID  VID
    HBK        20071209013112
    You may also want to store XML in XMLType columns for both performance and storage optimizations.

  • XML Extract from CLOB Column

    We have some XML data loaded into CLOB columns, for reasons too long to explain here we are not using the XMLTYPE, but we do need to extract rows based on conditions of the XML data. For performance reasons we do not want to index the CLOB column. I am looking at ways of inspecting the XML and returning matching results by casting the CLOB out as XMLTYPE and opening up xpath/xquery functions - but need this to be efficient. I have initially used extract().getXXXXVal in the where clause of a select statement, ie. where x.xmltype(clob_col).extract('<xpath>').getNumberVal = nn, but have found this very inefficient with memory usage increasing consistently and CPU hitting 100%. can anyone suggest some alternative methods?

    Hi
    In expression operator ignore "PLS-00201: identifier 'EXTRACTVALUE' must be declared" .
    In Mapping Level Configure Default Operating Mode : Setbased and
    Generation Mode : Setbased
    and deploy and execute your mapping.

  • XPath query on a CLOB?

    Does anyone know if there is an easy way to run an XPath query against a CLOB column? I know it's simple if the column is XMLType, but what if it's a CLOB?

    Does CLOB store XML? If so, simply use XMLTYPE(clob_column).
    SY.

  • Parse XML Elements/Attributes from CLOB in PL/SQL

    Hi folks,
    I'm new to XML development in Oracle...I need some help in Parsing a XML stored in a CLOB column using PL/SQL.
    We are using Oracle 9i R2. Do i need install the XDK and /or XML DB?
    Basically the xml has some quiz questions and the answers to the quiz. Once student submits the quiz we need parse the XML and calculate the grade.
    Any help is appreciated...
    Thanks,

    A bit dirty but this works:
    Create an XMLType based on the CLOB contents...
    select extractvalue(value(x), '/PERSON/PER_ID/text()') PER_ID, extractvalue(value(x), '/PERSON/PER_ID/@changed') PER_ID_CHG
    , extractvalue(value(x), '/PERSON/SURNAME/text()') PER_SURNAME, extractvalue(value(x), '/PERSON/SURNAME/@changed') PER_SURNAME_CHG
    , extractvalue(value(x), '/PERSON/ADDRESS/STREET_NO/text()') PER_STREET_NO, extractvalue(value(x), '/PERSON/ADDRESS/STREET_NO/@changed') PER_STREET_NO_CHG
    , extractvalue(value(x), '/PERSON/ADDRESS/POSTCODE/text()') PER_POSTCODE, extractvalue(value(x), '/PERSON/ADDRESS/POSTCODE/@changed') PER_POSTCODE_CHG
    from table(xmlsequence(extract(xmltype('
    <PERSON>
    <PER_ID changed="1">260180</PER_ID>
    <SURNAME changed="2">MARTIN</SURNAME>
    <ADDRESS>
    <STREET_NO changed="3">1</STREET_NO>
    <POSTCODE changed="4">LE3 8RA</POSTCODE>
    </ADDRESS>
    </PERSON>')
    , 'PERSON')
    ) x;

  • How to query XML data stored in a CLOB column

    I don't know XMLDB, so I have a dumb question about querying XML data which is saved as CLOB in a table.
    I have a table (OLAP_AW_PRC), with a CLOB column - AW_XML_TMPL_VAL
    This column contains this xml data - [click here|http://www.nasar.net/aw.xml]
    Now I want to query the data using the xml tags - like returning the name of AW. This is where I am having trouble, how to query the data from AW_XML_TMPL_VAL clob column.
    The following query generates error:
    ORA-31011: XML parsing failed.
    ORA-19202: Error occurred in XML processing
    LPX-00229: input source is empty
    SELECT
    extractValue(value(x), '/AW/LongName') as "AWNAME"
    from
    OLAP_AW_PRC,
    table(xmlsequence(extract (xmltype(AW_XML_TMPL_VAL), '/AWXML/AWXML.content/Create/ActiveObject/AW'))) x
    where
    extractValue(value(x) , '/AW/Name') = 'OMCR4'
    - Nasar

    Mark,
    Thanks. This is exactly what I was looking for.
    After doing @Name in both places (SELECT and WHERE clause) it worked.
    Now I have one more question.
    There are multiple DIMENSION tags in my xml, and I want to see the NAME attribute values for all of those DIMENSIONs. The following query returns
    ORA-19025: EXTRACTVALUE returns value of only one node.
    Cause: Given XPath points to more than one node.
    Action: Rewrite the query so that exactly one node is returned.
    SELECT
    extractValue(value(x), '/AW/@Name') as "AW",
    extractValue(value(x), '/AW/Dimension/@Name') as "DIMENSIONS"
    from
    OLAP_AW_PRC,
    table(xmlsequence(extract (xmltype(AW_XML_TMPL_VAL), '/AWXML/AWXML.content/Create/ActiveObject/AW'))) x
    where
    extractValue(value(x) , '/AW/@Name') = 'OMCR4'

  • Searching CLOB column of XML documents with leading wildcard - Performance

    Hi, our table has a text indexed CLOB column of XML documents and when performing a search with a leading wild card, we never retrieve any results.
    The query looks like this:
    select id from <table> where contains(columnname, '(%12345)') > 0;
    I cant even generate an explain plan from this query. I killed it after 39 minutes.
    If the query changes to:
    select id from <table> where contains(columnname, '(12345%)') > 0;
    I get an explain plan immediately with a cost=2 and when I execute the query, I get results in less than a second.
    I'd appreciate any thoughts of what I should check or what the problem might be.
    Thanks! Doug

    Can you provide a script that reproduces the case. I am unable to reproduce the problem with just some small sample data, as shown below. That means that there is nothing wrong with the syntax, but you may be having problems due to the size of your data or other parameters that have not been mentioned.
    SCOTT@10gXE> CREATE TABLE your_table (id NUMBER, columnname CLOB)
      2  /
    Table created.
    SCOTT@10gXE> insert into your_table
      2  select 1, dbms_xmlgen.getxml
      3             ('select deptno, dname,
      4                   cursor (select empno, ename
      5                        from      emp
      6                        where  emp.deptno = dept.deptno ) employee
      7               from   dept
      8               where  deptno = 10')
      9  from   dual
    10  /
    1 row created.
    SCOTT@10gXE> SELECT * FROM your_table
      2  /
            ID COLUMNNAME
             1 <?xml version="1.0"?>
               <ROWSET>
                <ROW>
                 <DEPTNO>10</DEPTNO>
                 <DNAME>ACCOUNTING</DNAME>
                 <EMPLOYEE>
                  <EMPLOYEE_ROW>
                   <EMPNO>7782</EMPNO>
                   <ENAME>CLARK</ENAME>
                  </EMPLOYEE_ROW>
                  <EMPLOYEE_ROW>
                   <EMPNO>7839</EMPNO>
                   <ENAME>KING</ENAME>
                  </EMPLOYEE_ROW>
                  <EMPLOYEE_ROW>
                   <EMPNO>7934</EMPNO>
                   <ENAME>MILLER</ENAME>
                  </EMPLOYEE_ROW>
                 </EMPLOYEE>
                </ROW>
               </ROWSET>
    SCOTT@10gXE> CREATE INDEX your_idx ON your_table (columnname)
      2  INDEXTYPE IS CTXSYS.CONTEXT
      3  /
    Index created.
    SCOTT@10gXE> EXEC DBMS_STATS.GATHER_TABLE_STATS ('SCOTT', 'YOUR_TABLE')
    PL/SQL procedure successfully completed.
    SCOTT@10gXE> SET AUTOTRACE ON EXPLAIN
    SCOTT@10gXE> select id from your_table where contains (columnname, '(%839)') > 0
      2  /
            ID
             1
    Execution Plan
    Plan hash value: 2832585188
    | Id  | Operation                   | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT            |            |     1 |   888 |     0   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| YOUR_TABLE |     1 |   888 |     0   (0)| 00:00:01 |
    |*  2 |   DOMAIN INDEX              | YOUR_IDX   |       |       |     0   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access("CTXSYS"."CONTAINS"("COLUMNNAME",'(%839)')>0)
    SCOTT@10gXE> SET AUTOTRACE OFF

  • Forms 6.0 how to query clob column with oracle 9.2 DB

    hi every body,
    i made install for oracle 9.2 oracle DB every thing goes ok but when i made query in my form version 6.0 which have CLOB column the form closed automatically without any message?
    and just for know when i run the same form with oracle 8.1.7 DB the form made query normally without any problem.
    i want your help please.
    Message was edited by:
    mshaqalaih

    I know there was a problem in 6i where you would get a crash if your query returned more than {Max Length} characters of the field representing the CLOB column.

  • Problem inserting value in CLOB column from an XML file using XSU

    Hi,
    When I try to insert CLOB value into Oracle9i database from an XML document using XSU, I get an exception as below.
    09:37:32,392 ERROR [STDERR] oracle.xml.sql.OracleXMLSQLException: 'java.sql.SQLException: ORA-03237: Initial Extent of specified size cannot be allocated
    ORA-06512: at "SYS.DBMS_LOB", line 395
    ORA-06512: at line 1
    ' encountered during processing ROW element 0. All prior XML row changes were rolled back. in the XML document.
    All Element tags in XML doc. is mapped to columns in the database. One of the table columns is CLOB. That is the one that gives the above exception. Here is the xml...
    ID - is autogenerated value.
    <?xml version="1.0" ?>
    <ROWSET>
    <ROW num="1">
    <ID></ID>
    <SEQ>
    GCATAGTTGTTATGAAGAAATGGAAGAAAAATGCACTCAAAGTTGGGCTGTCAGGCTGTCTGGGGCTGAATTCTGGTGTGACAGTGTGATGAAGCCATCTTTGAGCCTAAATTTGATAATGAGCCAGTCATGATCTGGTTGTGATTACTATAACAAGATTAAATCTGAATAAGAGAGCCACAACTTCTTTAAAGACAGATTGTCAAGTCATTACATGGAAGAGGGAGATTGCTCCTTTGTAAATCAGGCTGTCAGGCCAACTGAATGAAGGACGTCATTGTACAGTAACCTGATGAAGATCAGATCAACCGCTCACCTCGCCG
    </SEQ>
    </ROW>
    </ROWSET>
    Can anyone identify what's the problem.. and suggest a solution for this..?
    Thanks in advance..
    Viji

    Would you please specify the XDK verison and database version?

  • Reading Xml file from clob column in the staging table

    Hi,
    I am trying to poll the staging table with the database adapter which has CLOB column type containing XML file. How do I extract the XML file from CLOB and map the fields to the another variable with definite schema.
    Thanks,
    Edited by: chaitu123 on Sep 20, 2009 8:16 AM

    1) when you create DBAdapter on a table which having the clob column watch closely the created xsd for the DBAdapter the clob cloumn element should be a String data type
    2) create xsd for Xml File and create variable for the xsd element
    3) use ora:parseEscapedXML("yourDBAdapterclobElement") to XmlFileVarilable
    Krishna

Maybe you are looking for