Documents in Clob

Can I store Word Perfect, Word, WordPad, etc text documents in a Clob column on a 9i database? I want to use Clob so the document can be searched is there another way to do this?
Thanks
Kristi

The Dynamic News sample app shows some techniques for working with XML documents in CLOBs.
Regards,
-rh

Similar Messages

  • XML document in CLOB with reference to external DTD

    If you place the xml document in clob using dbms_lob and the document has reference to external (system) DTD then it gives an error 'Error opening external DTD'. Whats the work around. See example below...
    declare
    xmlstring CLOB;
    xmlstring1 CLOB;
    os_file BFILE := bfilename('BFILE_DIR','family.xml');
    > > > rowsp INTEGER; > > > errnum NUMBER; > > > errmsg VARCHAR2(2000);
    > > > time VARCHAR2(20); > > > begin
    > > > select to_char(sysdate,'MM/DD/YYYY HH24:MI:SS')
    > > > into time from dual; > > > dbms_output.put_line(time);
    > > > dbms_lob.createtemporary(xmlstring, true, > > > dbms_lob.session);
    > > > dbms_lob.fileopen(os_file, > > dbms_lob.file_readonly);
    > > > dbms_lob.loadfromfile(xmlstring, os_file,
    > > > dbms_lob.getlength(os_file));
    > > > select to_char(sysdate,'MM/DD/YYYY HH24:MI:SS')
    > > > into time from dual; > > > dbms_output.put_line(time);
    > > > xmlgen.resetOptions; > > > xmlgen.setRowTag('family');
    > > > --xmlgen.setIgnoreTagCase(xmlgen.IGNORE_CASE);
    > > > rowsp := xmlgen.insertXML('family',xmlString);
    > > > dbms_output.put_line(' Rows processed = '| | > > > TO_CHAR(rowsp));
    > > > dbms_lob.freetemporary(xmlstring);
    > > > dbms_lob.fileclose(os_file); > > > commit; > > > exception
    > > > when no_data_found then > > > rollback;
    > > > dbms_lob.freetemporary(xmlstring);
    > > > dbms_lob.fileclose(os_file); > > > errnum := abs(SQLCODE);
    > > > errmsg := SQLERRM;
    > > > dbms_output.put_line(errnum| |'----'| |errmsg); > > > when others then
    > > > rollback; > > > dbms_lob.freetemporary(xmlstring);
    > > > dbms_lob.fileclose(os_file); > > > errnum := abs(SQLCODE);
    > > > errmsg := SQLERRM;
    > > > dbms_output.put_line(errnum| |'----'| |errmsg); > > > end;

    Can be one of two problems.
    One
    Your database user does not have
    privileges to open a socket inside
    the database. This will prevent
    the XML parser running inside the DB
    from retrieving the DTD which it must
    do to properly parse the document.
    Two
    you are sitting behind a corporate
    firewall and need to properly set
    the Proxy Server host and port to
    properly retrieve the DTD.
    From looking at your code it would appear
    that your job can more easily be done by
    using the OracleXML putXML command line
    utility outside the database.
    You can specify the -D options to your
    JavaVM to set the System properties for
    the proxy server if need be like this:
    java -DproxySet=true -DproxyHost=yourproxyserver OracleXML putXML

  • Load xml document from CLOB

    I'm try to load xml document from CLOB in following way:
    --- procedure loadXML.sql -----
    CREATE OR REPLACE PROCEDURE loadXML
    IS
    CONTENT CLOB := ' ';
    SOURCE bfile := BFILENAME('XMLFILES', 'N_95_A.xml');
    begin
    DBMS_LOB.OPEN(SOURCE, DBMS_LOB.LOB_READONLY);
    DBMS_LOB.loadFromFile(CONTENT, SOURCE, DBMS_LOB.getLength(SOURCE));
    DBMS_LOB.fileClose(SOURCE);
    insert into OFERTY (OFDOCUMENT)
    values (sys.XMLtype.createXML(CONTENT));
    commit;
    end;
    and I get
    SQL> @e:\myxml\loadXML
    declare
    ERROR at line 1:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00210: expected '<' instead of '<'
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at line 1
    ORA-06512: at line 8
    What is wrong?

    Have you tried simply outputting iusing the htp.p function? for example:
    /* ... inside a PL/SQL region */
    declare
       lclb_output clob;
    begin
       select doc_xml into lclb_output from mf_xml_docs where doc_id = :P1_DOC_ID;
       htp.p(lclb_output); -- you may have to split this into chunks and loop through, depending on how big the clob is
    end;

  • Display XML Document from CLOB Column on page

    Hi,
    I have been reading all the CLOB postings that I can find, but I still cannot get my page to do what I want.
    I have a very simjple table:
    MF_XML_DOCS (DOC_ID NUMBER, DOC_XML CLOB)
    I can populate this table OK but I am having problems getting the cotent back out. I want a simple page that takes an ID Number and displays the XML Document for that ID (select doc_xml from mf_xml_docs where doc_id = :P1_DOC_ID). Everything I try either truncates the text (or errors) at 4000 or 32767 characters or reads the XML tags as tags and does not display them. I want a simple display of the XML Document (and I don't mind if it is in an 'updateable' field or not):
    <Parent>
       <name>Dad</name>
       <Children>
          <Child>
             <name>Number 1 Son</name>
         </Child>
          <Child>
             <name>Number 2 Son</name>
         </Child>
       </children>
    </Parent>But when I do something that works for large (32767+) documents all I see is 'Dad Number 1 Son Number 2 Son'.
    Help!!
    many thanks,
    Martin

    Have you tried simply outputting iusing the htp.p function? for example:
    /* ... inside a PL/SQL region */
    declare
       lclb_output clob;
    begin
       select doc_xml into lclb_output from mf_xml_docs where doc_id = :P1_DOC_ID;
       htp.p(lclb_output); -- you may have to split this into chunks and loop through, depending on how big the clob is
    end;

  • Something is wrong about passing xml document to clob

    Dear All,
    I have a procedure that uses XMLELEMENT to create an XML source. When I try to pass the XML source to the outgoing parameter of the procedure I receive an error saying
    "ORA-19011: Character string buffer too small"
    When I checked the length of the source it was just 5000 characters long. How is it possible that I can't give this to a clob?
    Thank you,
    Franky

    I'm going to answer it for myself.
    Use getclobval() function any you will succeed.
    Franky

  • Intermedia text search in XML document stored as CLOB

    Suppose i store an XML document as clob
    and i index it based on the tags ie
    if i have the followind table
    create table biodata (
    resume_id number primary key,
    content clob default empty_clob(),
    applicant_id number references
    applicants(id));
    and i stores various resumes in the clob (content column ) as xml document ie
    <experience_in_months> 22 </experience_in_months>
    Now if i want all the resume_id that that have experiences_in_months >= 10
    what would be the query that would fetch me this result?

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by voron:
    We are storing data in XML format in an Oracle database (via CLOB). I can retrieve search results using the 'within' phrase, but am finding it hard to order them. Is there a utility or command I can use?<HR></BLOCKQUOTE>
    Maybe you should write a stored procedure (function )
    that extracts the section from your clob
    that should be sorted. Then use this function
    in the ORDER clause of your select statement.
    Andreas
    null

  • How can I query data from XML file stored as a CLOB ?

    Hi folks,
    please see below sample of XML file, which is stored in "os_import_docs", column "document" as CLOB.
    I would like to query this XML file using some SQL select.
    How can I query data form below XML?
    <?xml version="1.0" encoding="UTF-8"?>
    <etd>
      <header>
        <AR>000000000</AR>
        <AW>0</AW>
        <CT>S</CT>
        <CU>H</CU>
        <CZ>SS48</CZ>
        <BU>4</BU>
        <CH>0032</CH>
        <CK>2012-11-01</CK>
        <CL>21:18</CL>
        <CW>225</CW>
        <CX>0</CX>
        <CF>SS-CZL18</CF>
        <DV>2</DV>
      </header>
      <account_group id="234">
        <account id="234">
          <invoice id="000742024">
            <da>
              <AR>000742024</AR>
              <AW>0</AW>
              <CT>D</CT>
              <CU>A</CU>
              <CH>0032</CH>
              <BY>31-10-2012</BY>
              <CA>25-10-2012</CA>
              <AB>234</AB>
              <AA>234</AA>
              <BS>88754515</BS>
              <AD>Mike Tyson</AD>
              <AC>Mike Tyson</AC>
              <AZ>CZ6521232465</AZ>
              <AE/>
              <CG>A</CG>
              <AL>A</AL>
              <BZ>.</BZ>
              <AH>Some street</AH>
              <AI/>
              <AF>Some city</AF>
              <AK>Kraj</AK>
              <AG>CZ</AG>
              <AJ>885 21</AJ>
              <CR>21-11-2012</CR>
              <AY>602718709</AY>
              <AV>800184965</AV>
              <AP/>
              <AO/>
              <AQ/>
              <AN/>
            </da>
            <da>
              <AR>000742024</AR>
              <AW>0</AW>
              <CT>D</CT>
              <CU>A</CU>
              <CH>0032</CH>
              <BY>31-10-2012</BY>
              <CA>25-10-2012</CA>
              <AB>234</AB>
              <AA>234</AA>
              <BS>88754515</BS>
              <AD>Mike Tyson</AD>
              <AC>Mike Tyson</AC>
              <AZ>CZ6521232465</AZ>
              <AE/>
              <CG>A</CG>
              <AL>L</AL>
              <BZ>Mike Tyson</BZ>
              <AH>Some street</AH>
              <AI/>
              <AF>Some city</AF>
              <AK>Kraj</AK>
              <AG>CZ</AG>
              <AJ>885 21</AJ>
              <CR>21-11-2012</CR>
              <AY/>
              <AV>800184965</AV>
              <AP/>
              <AO/>
              <AQ/>
              <AN/>
            </da>
            <detaildc CH="0032" AB="234" BS="11888954" BB="32" BA="CZ" AT="" CI="7077329000002340342" AU="" DU="1Z48395" CB="CZK">
              <dc>
                <AW>0</AW>
                <CT>D</CT>
                <CU>C</CU>
                <BY>31-10-2012</BY>
                <CA>25-10-2012</CA>
                <CV>8151</CV>
                <BT>12111</BT>
                <CJ>1</CJ>
                <AM>0</AM>
                <DR>PC</DR>
                <DS/>
                <DO>25-10-2012</DO>
                <DQ>18:42</DQ>
                <CE>1</CE>
                <BH>8151</BH>
                <CY>8151 SHELL MALKOVICE P</CY>
                <DP>049336</DP>
                <DT/>
                <BQ/>
                <BR>500000</BR>
                <CN>30</CN>
                <CM>030</CM>
                <BO>160,00</BO>
                <BF>38,900</BF>
                <BC>6224,00</BC>
                <BI>32,417</BI>
                <CD>B</CD>
                <BG>0,600</BG>
                <BK>31,817</BK>
                <BJ>0,000</BJ>
                <DI>8</DI>
                <BP>20,00%</BP>
                <CC>CZK</CC>
                <BM>5090,67</BM>
                <BN>1018,13</BN>
                <BL>6108,80</BL>
                <BD>5090,67</BD>
                <BE>1018,13</BE>
                <DW>6108,80</DW>
                <CO>Nafta</CO>
              </dc>
            </detaildc>
            <dt>
              <AR>000742024</AR>
              <AW>0</AW>
              <CT>D</CT>
              <CU>T</CU>
              <CH>0032</CH>
              <BY>31-10-2012</BY>
              <CA>25-10-2012</CA>
              <AB>234</AB>
              <AA>234</AA>
              <BS>11888954</BS>
              <BB/>
              <BA>CZ</BA>
              <DG>1</DG>
              <CN>30</CN>
              <CM>030</CM>
              <DF>160,00</DF>
              <DH>litr</DH>
              <DJ>20,00%</DJ>
              <DD>5090,67</DD>
              <DE>1018,13</DE>
              <DC>6108,80</DC>
              <DB>CZK</DB>
              <DA>P</DA>
              <AX/>
              <CQ/>
              <CP/>
            </dt>
            <dt>
              <AR>000742024</AR>
              <AW>0</AW>
              <CT>D</CT>
              <CU>T</CU>
              <CH>0032</CH>
              <BY>31-10-2012</BY>
              <CA>25-10-2012</CA>
              <AB>234</AB>
              <AA>234</AA>
              <BS>11888954</BS>
              <BB/>
              <BA>CZ</BA>
              <DG>2</DG>
              <CN/>
              <CM/>
              <DF>160,00</DF>
              <DH>litr</DH>
              <DJ/>
              <DD>5090,67</DD>
              <DE>1018,13</DE>
              <DC>6108,80</DC>
              <DB>CZK</DB>
              <DA/>
              <AX/>
              <CQ/>
              <CP/>
            </dt>
            <dt>
              <AR>000742024</AR>
              <AW>0</AW>
              <CT>D</CT>
              <CU>T</CU>
              <CH>0032</CH>
              <BY>31-10-2012</BY>
              <CA>25-10-2012</CA>
              <AB>234</AB>
              <AA>234</AA>
              <BS>11888954</BS>
              <BB/>
              <BA>CZ</BA>
              <DG>19</DG>
              <CN/>
              <CM/>
              <DF/>
              <DH/>
              <DJ/>
              <DD>5090,67</DD>
              <DE>1018,13</DE>
              <DC>6108,80</DC>
              <DB>CZK</DB>
              <DA/>
              <AX/>
              <CQ/>
              <CP/>
            </dt>
            <dt>
              <AR>000742024</AR>
              <AW>0</AW>
              <CT>D</CT>
              <CU>T</CU>
              <CH>0032</CH>
              <BY>31-10-2012</BY>
              <CA>25-10-2012</CA>
              <AB>234</AB>
              <AA>234</AA>
              <BS>11888954</BS>
              <BB/>
              <BA>CZ</BA>
              <DG>8</DG>
              <CN/>
              <CM/>
              <DF/>
              <DH/>
              <DJ/>
              <DD>5090,67</DD>
              <DE>1018,13</DE>
              <DC>6108,80</DC>
              <DB>CZK</DB>
              <DA/>
              <AX/>
              <CQ/>
              <CP/>
            </dt>
          </invoice>
        </account>
      </account_group>
      <footer>
        <AR>999999999</AR>
        <AW>0</AW>
        <CT>S</CT>
        <CU>T</CU>
        <CZ>SS48</CZ>
        <BU>4</BU>
        <CH>0032</CH>
        <CK>2012-11-01</CK>
        <CL>23:04</CL>
        <CW>225</CW>
        <BX>1</BX>
        <CS>7</CS>
        <BW>0000000000000610880</BW>
      </footer>
    </etd>sample - not working:
        select  x.*
        from os_import_docs d
             ,XMLTABLE('/etd/header'
                        PASSING httpuritype(d.document).getXML()
                        COLUMNS
                           response_status varchar2(50) PATH 'AR'
                        )  x
       where d.object_id = 2587058
         and rownum = 1; 
    ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 6196, maximum: 4000)Many thanks,
    Tomas

    Hello,
    many thanks for the reply. Your examples are very usefull for me.
    To answer your questions.
    An XML structure:
    /etd
        /header - repeat in each row in output
        /account_group/account
            /invoice
                /da - repeat for each details under "selected "invoice
                /detaildc/dc - the lowest level 
                /detaildn/dn - the lowest level 
                /dt - repeat for each details under "selected "invoice
        /footer - repeat in each row in outputI would like to to have a 1 row for each "record" in /detaildc section and include related nodes at higher levels.
    Please see below XML file, which is simplified file of example in first post, but includes a complete xml structure which needs to be queried in db.
    <?xml version="1.0" encoding="UTF-8"?>
    <etd>
      <header>
        <AR>000000000</AR>
        <CK>2012-10-31</CK>
        <CF>SS-CZL19</CF>
      </header>
      <account_group id="234">
        <account id="234">
          <invoice id="EI08P4000">
            <da>
              <AR>EI08P4000</AR>
              <AD>Mickey Mouse</AD>
            </da>
            <detaildc DU="1Z56655" CB="EUR">
              <dc>
                <DO>16-10-2012</DO>
                <CY>ASFINAG POST_MAUT</CY>
                <BM>1940,60</BM>
                <CO>Dalnicni znamka</CO>
              </dc>
            </detaildc>
            <detaildc DU="2Z55050" CB="EUR">
              <dc>
                <DO>17-10-2012</DO>
                <CY>ASFINAG POST_MAUT</CY>
                <BM>1328,10</BM>
                <CO>Dalnicni znamka</CO>
              </dc>
            </detaildc>
            <detaildc DU="2Z90001" CB="EUR">
              <dc>
                <DO>27-10-2012</DO>
                <CY>ASFINAG POST_MAUT</CY>
                <BM>185,10</BM>
                <CO>Poplatek</CO>
              </dc>
            </detaildc>
            <dt>
              <AR>EI08P4000</AR>
              <DG>8</DG>
            </dt>
          </invoice>
        </account>
        <account id="234">
          <invoice id="EI13T7777">
            <da>
              <AR>EI13T7777</AR>
              <AD>Mickey Mouse</AD>
            </da>
            <detaildc DU="1Z48302" CB="EUR">
              <dc>
                <DO>26-10-2012</DO>
                <CY>SANEF 07706 A 07704</CY>
                <BM>232,10</BM>
                <CO>Dalnicni poplatek</CO>
              </dc>
            </detaildc> 
            <detaildc DU="1Z48302" CB="EUR">
              <dc>
                <DO>20-10-2012</DO>
                <CY>TEST A 07704</CY>
                <BM>30,10</BM>
                <CO>Poplatek</CO>
              </dc>
            </detaildc>       
            <dt>
              <AR>EI13T7777</AR>
              <DG>8</DG>         
            </dt>
          </invoice>
        </account>
        <account id="234">
          <invoice id="EI327744">
            <da>
              <AR>EI327744</AR>
              <AD>Mickey Mouse</AD>
            </da>
            <detaildn  CI="707732 00000234" >
              <dn>
                <BY>30-10-2012</BY>
                <BM>8,10</BM>
              </dn>
            </detaildn>
            <detaildn CI="707732 00000234" >
              <dn>
                <BY>30-10-2012</BY>
                <BM>399,50</BM>
              </dn>
            </detaildn>
            <dt>
              <AR>EI327744</AR>
            </dt>
          </invoice>
        </account>
        <account id="234">
          <invoice id="EI349515">
            <da>
              <AR>EI349515</AR>
              <AD>Mickey Mouse</AD>
            </da>
            <detaildc DU="1Z56514" CB="EUR">
              <dc>
                <DO>29-10-2012</DO>
                <CY>ALLAMI AUTOPALYAKEZE</CY>
                <BM>1240,60</BM>
                <CO>Dalnicni znamka</CO>
              </dc>
            </detaildc>
            <detaildc DU="1Z56515" CB="EUR">
              <dc>
                <DO>19-10-2012</DO>
                <CY>ASFINAG POST_MAUT</CY>
                <BM>7428,10</BM>
                <CO>Dalnicni znamka</CO>
              </dc>
            </detaildc>
            <detaildc DU="1Z56515" CB="EUR">
              <dc>
                <DO>12-10-2012</DO>
                <CY>UK</CY>
                <BM>954,10</BM>
                <CO>Poplatek</CO>
              </dc>
            </detaildc>
            <dt>
              <AR>EI349515</AR>
              <DG>8</DG>
            </dt>
          </invoice>
        </account>
      </account_group>
      <footer>
        <CZ>SS47</CZ>
        <BU>4</BU>
        <CH>0032</CH>
        <CK>2012-10-31</CK>
        <CL>01:25</CL>
      </footer>
    </etd>Expected output
    AR     CK     CF             AR4             AD             DU     CB     DO             CY                     BM      CO                AR5             DG     CI             BY               BM6     CZ     BU       CH       CK7    CL
    0     41213     SS-CZL19     EI08P4000     Mickey Mouse     1Z56655     EUR     16-10-2012     ASFINAG POST_MAUT     1940,60     Dalnicni znamka        EI08P4000     8                                    SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI08P4000     Mickey Mouse     2Z55050     EUR     17-10-2012     ASFINAG POST_MAUT     1328,10     Dalnicni znamka        EI08P4000     8                                    SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI08P4000     Mickey Mouse     2Z90001     EUR     27-10-2012     ASFINAG POST_MAUT      185,10     Poplatek        EI08P4000     8                                    SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI13T7777     Mickey Mouse     1Z48302     EUR     26-10-2012     SANEF 07706 A 07704      232,10     Dalnicni poplatek  EI13T7777     8                                    SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI13T7777     Mickey Mouse     1Z48302     EUR     20-10-2012     TEST A 07704               30,10     Poplatek        EI13T7777     8                                    SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI327744     Mickey Mouse                                                                      EI327744          707732 00000234     30-10-2012     8,10     SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI327744     Mickey Mouse                                                                      EI327744          707732 00000234     30-10-2012     399,50     SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI349515     Mickey Mouse     1Z56514     EUR     29-10-2012     ALLAMI AUTOPALYAKEZE     1240,60     Dalnicni znamka        EI349515     8                                    SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI349515     Mickey Mouse     1Z56515     EUR     19-10-2012     ASFINAG POST_MAUT     7428,10     Dalnicni znamka        EI349515     8                                    SS47     4     32     41213     01:25
    0     41213     SS-CZL19     EI349515     Mickey Mouse     1Z56515     EUR     12-10-2012     UK                      954,10     Poplatek        EI349515     8                                    SS47     4     32     41213     01:25

  • Mapping XML documents in Oracle

    I am a newbie in Oracle.
    I would like to know how to store entire XML documents in CLOBS.
    Since yesterday I hear about XSQL, and I was wondering if nobody had some sample code to realize this mapping.
    Thanks in advance for your help
    Mamoudou

    OTN has some sample apps that might interest you:
    [list][*]Customizing Web Content
    [*]B2B with XML
    [*]WebStore B2B Exchange
    [*]XML Flight Finder
    [list]
    Regards,
    -rh

  • Retrieve the large volume XML in CLOB

    If I store the larage volume XML documents
    in the database CLOB field,
    How can I retreive the corresponding XML file
    efficently?
    null

    The Dynamic News sample app shows some techniques for working with XML documents and CLOB fields.
    Regards,
    -rh

  • Oracle Issue around handling CLOB within Workflow Transaction

    Hi,
    - In Workflow Notification Message I am using an CLOB Document for building the
    message Body
    - This CLOB value is going to be SELECTed and initialized from a TABLE
    (having CLOB column) during the document related procedure execution
    NOTE: In order to select from a CLOB we need to issue FOR UPDATE
    to have read consistency
    (otherwise it will give LOB not locked for update error during notification display)
    Here the issue I am facing is :
    The same notification is going to be sent to Multiple users (thru Notification
    to a Apps.Responsibility i.e. WF Role)
    When USER1 opens the notification, the CLOB Table row gets a lock
    (due to FOR UPDATE) and is not released until ROLLBACK/COMMIT
    which will not happen as it is a workflow (if I put this Select FOR UPDATE
    in a AUTONOMOUS transaction then it gives error as LOCATOR id cannot
    spawn between transactions during the notification display)
    When USER2/USER3 opens the same notification which he received being a member
    of the Responsibility , the notificaiton screen gets hanged as it again
    tries to issue SELECT FOR UPDATE and sees USER1 holds the lock.
    My Requirement is:
    When first time anyone user opens the notification, it will not find a record in table
    so it builds the notification and stores the CLOB record into the table.
    Next time onwards all the users should get the stored record from the table
    (Read CLOB value from Table and show in the Notification Message Body)
    Please help me in resolving the SELECT FOR UPDATE of a CLOB within Workflow
    when multiple users need to issue without the need of a COMMIT/ROLLBACK
    NOTE: Even I am only Reading the CLOB value from a Table, without
    having any need of updating it, still I need to Issue FOR UPDATE
    as per Oracle CLOB constraint.
    thanks,
    Shashi

    Hi,
    I didn't do the select directly into document when I did it in my test. Here's the two different methods that I used in my database to test the problem:
    create or replace procedure msclobtest
                       (document_id   IN     VARCHAR2
                       ,display_type  IN     VARCHAR2
                       ,document      OUT    CLOB
                       ,document_type OUT    VARCHAR2
                       ) as
    cursor c1 is select theclob from ms3 where clob_id = 4;
    v_clob clob;
    begin
    debug('started clob');
    open  c1;
    fetch c1 into v_clob;
    close c1;
    document := v_clob;
    document_type := 'text/html';
    debug('clob ended');
    end;
    create or replace procedure msclobtest
                       (document_id   IN     VARCHAR2
                       ,display_type  IN     VARCHAR2
                       ,document      OUT    CLOB
                       ,document_type OUT    VARCHAR2
                       ) as
    cursor c1 is select theclob from ms3 where clob_id = 4;
    v_clob clob;
    begin
    open  c1;
    fetch c1 into v_clob;
    close c1;
    dbms_lob.createtemporary(document,FALSE);
    dbms_lob.copy(document,v_clob,dbms_lob.getlength(v_clob));
    document_type := 'text/html';
    end;If it's not the code, then it might be something in the Workflow itself.
    Are the values of the document attribute being set correctly in the Workflow? Are you sending to a role? Have you checked the "Expand Roles" tick box? Have you checked the "Attach Content" tick box?
    Matt
    Alpha review chapters from my book "Developing With Oracle Workflow" are available on my website:
    http://www.workflowfaq.com
    http://forum.workflowfaq.com

  • HELP:Problem in creating a temporary CLOB using JDBC connection pooling

    Hi All,
    i am inserting a large xml document in an xml type column by creating a temporary clob of this document
    tempClob = CLOB.createTemporary(conn, true, CLOB.DURATION_SESSION);
    I am not having any success getting the following statement working using a JDBC connection pool rather than a hard coded URL connection
    it works with:
    "jdbc:oracle:thin:@server:port:dbname" connection
    Does NOT work with:
    datasource.getConnection()
    Does any one know how to successfully get this to work?
    urgently plz........

    Hi Dharmi
    Here is a quote of Dafna's post in [another thread in this forum|Re: Copy VC controls]
    CE7.1.1 will be released at September 2008 for ramp-up customers.
    There are many improvements and new capabilities in the new release of Visual Composer for CE7.1.1. Among the new features you can find:
    The missing features from Visual Composer 7.0 (Html view, portal Eventing support (EPCM), JDBC, Undo/Redo, and more..)
    Many layout & modeling improvements
    Additional ALV table functionality - export to Excel, switch to chart, configure ALV behavior at design time
    Integration of Visual Composer in Eclipse - additional entry point to the Visual Composer models from the NWDS. This integration provides the option to add a WD component (in case of missing functionality in Visual Composer), as a black box component to the Visual Composer model. Right-clicking the component will open the Web Dynpro perspective for creating/modifying the component.
    Regards,
       Shai

  • AQ - XSD Schema Questions

    What I am looking to do is use BPEL for messaging (and manipulation of said messages) in the backend for data synchronization to disparate sources.
    Currently, we are investigating the following:
    Oracle 9i DB with a stored procedure that accepts a number of parameters (or XML Document in CLOB format), processes the document (updates, typically), and before returning, writing the output XML document to an AQ setup on that DB instance.
    BPM (installed on an OAS 10g server instance) would be utilizing the AQ adapter to dequeue this message for processing through the orchestration.
    This is where our difficulty begins. The message the SP generates is based on an enterprise schema (EBOD - currently), which is a relatively robust XSD. Currently, we're looking how to get the AQ adapter to pick up this message (should it be a clob?) off the queue and essentially cast it into our schema that we've imported into the BPM. We haven't had much success doing this so far. Implementing a ADT that is "typed" in the 9i DB by retyping the entire schema is unacceptable, for obvious reasons.
    I think what we're looking to do is take this clob and essentially "cast" it into a message format defined by our schema. Maybe there is a better way to tackle this problem, by using something besides a CLOB (XMLType isn't supported yet, but even then... would that solve our problem?), but I am unsure. We need the message in a manipulatable form in order to call additional web services (that have differing interfaces) by extracting certain elements and passing those. Additionally, we may wish to do some business logic, routing, etc.
    I can clarify what I'm looking to do, but basically 9i DB Stored Proc writes an XML doc to an AQ. BPEL is monitoring said AQ, picks up the CLOB (that type for now) and casts the message to it's schema that we've loaded (no transformation necessary, the schema is for the specific XML doc - ie. the doc validates to that schema) and we basically go forward and process the rest of the orchestration based on this message.
    Can anyone help me with this approach? Any other suggestions?

    Hi Todd,
    The AQ Adapter allows the user to pick a CLOB field within an ADT as the payload and supply a schema for its definition.(pick "Field within Object" for the Business Payload in the AQ Adapter wizard)
    Your 9i DB Store Proc would write to the queue which is defined based on the ADT, with xml payload stored in the CLOB field. The BPEL process would be able to pick up this payload thru the AQ Adapter.
    There is a sample illustrating this scenario in the installation.
    integration\orabpel\samples\tutorials\124.AQAdapter\ADT_with_CLOB_Payload
    Note the sample also uses payload header which is defined by the ADT structure to access fields other than the payload field. The use of headers is optional.
    Let me know if this is what you're looking for.

  • About this XML database

    Today I have found these definitions:
    1.Native XML Database (NXD):
    a) Defines a (logical) model for an XML document -- as opposed to the data in that document -- and stores and retrieves documents according to that model. At a minimum, the model must include elements, attributes, PCDATA, and document order. Examples of such models are the XPath data model, the XML Infoset, and the models implied by the DOM and the events in SAX 1.0.
    b) Has an XML document as its fundamental unit of (logical) storage, just as a relational database has a row in a table as its fundamental unit of (logical) storage.
    c) Is not required to have any particular underlying physical storage model. For example, it can be built on a relational, hierarchical, or object-oriented database, or use a proprietary storage format such as indexed, compressed files.
    2.XML Enabled Database (XEDB) - A database that has an added XML mapping layer provided either by the database vendor or a third party. This mapping layer manages the storage and retrieval of XML data. Data that is mapped into the database is mapped into application specific formats and the original XML meta-data and structure may be lost. Data retrieved as XML is NOT guaranteed to have originated in XML form. Data manipulation may occur via either XML specific technologies(e.g. XPath, XSL-T, DOM or SAX) or other database technologies(e.g. SQL). The fundamental unit of storage in an XEDB is implementation dependent. The XML solutions from Oracle and Microsoft as well as many third party tools fall into this category.
    3.Hybrid XML Database (HXD) - A database that can be treated as either a Native XML Database or as an XML Enabled Database depending on the requirements of the application. An example of this would be Ozone.
    Which of them would you put XML DB in?

    If we consider the duality of the XMLType (store XML documents in CLOB's and structured storage with XML Schemas), could we say that it is an hybrid XML database?
    Native->CLOB's
    Enabled->structured storage
    I suppose this cuestion is a bit subjective, but I would like to know your opinions.
    Thanks in advance!

  • XML Parser for PL/SQL - charset

    Hi,
    I'm using XML Parser for PL/SQL and have some trouble with encoding of results xmldom.writeToBuffer and xmldom.writeToCLOB procedures.
    Some tags in my DOM documents contain text values in RUSSIAN (server nls_charset is CL8ISO8859P5). When I write document in varchar2 variable, buffer content is in UTF8 encoding ( convert UTF8->CL8ISO8859P5 -OK).
    xmldom.setCharset(doc, 'ISO-8859-5') just after xmldom.newDOMDocument has no effect.
    xmldom.setCharset(doc, 'CL8ISO8859P5') has no effect also.
    Explicit charset direction in third parameter of
    xmldom.writeToBuffer and xmldom.writeToCLOB procedure has no effect.
    When I write document in CLOB, and then read part of CLOB in varchar2 buffer - result contain '?' in place of all russian text characters.
    What's a problem?
    How can I force XML Parser write XML in server charset?
    Platform:
    Oracle8i Enterprise Edition Release 8.1.6.1.0
    JServer Release 8.1.6.1.0
    Oracle XML Parser for PL/SQL v 1.0.2

    I have the same problem. But in my case I am allowed only to use XML Parser for PL/SQL.
    Characterset 'WE8ISO8859P1' is used. And the language is latvian.
    After parsing a XML document and printing its contents, all latvian characters are replaced by "f".
    xmldom.setcharset(doc,'WE8ISO8859P1') has no effect.

  • PL/SQL to generate XML compliant with an XSD

    Please excuse me if this has been asked elsewhere. I'm trying on Oracle 9.2 to output XML that will comply with a predefined schema. I've started out by creating various object types and an object view that matches the xml schema definition, and can use dbms_xmlgen.getxml to get out an xml document (a clob) without trouble, BUT I need to post-process this with shell scripts to add on the namespace information and amend the tags to put in the (e.g.) ns3: bit to identify which is the target namespace. It seems odd that I should need to do this - is there a better way? I have trawled all over rthe place but cannot find any mention of this requirement. Thanks for any help you might give me, I'm new to xml.

    Okay forget that, here's a quote from Oracle:
    "I'm the PM for XML DB, and our preferred direction for generating XML from data stored in relational tables is the industry standard SQL/XML operators. DBMS_XMLGEN will continue to be supported but most of our development efforts in terms of performance / feature improvements willl be targetted at the SQL/XML operators (XMLELEMENT(), XMLATTRIBUTES(), XMLAGG(), XMLFOREST() etc). In general they have proven to be much more flexible and performant, and easier to use "
    So it seems that the object-type/view route is dead in the water. Shame.

Maybe you are looking for

  • SqlDeveloper Query = Fast, PL/SQL = Slow

    I've got a nagging problem that is driving me crazy. Database is 11.1.0.7 and SQLDeveloper is 1.5.1 with the same behavior in 3.0.03. Often I will develop a complex query in SQLDeveloper and get it tuned to a point where performance is great. However

  • I can't change the picture on iMessage on my Macbook Pro. Please help! :(

    Every time I try to change my picture on iMessage it only changes until I close out of it and then it reverts back to the default. So I know I go to Message --> Change My Picture --> Defaults --> Done Am I doing something wrong to where the picture w

  • Systems are not visiable in monitoring graphic

    Hi friends, I am not able to view systems under monitoring graphic. the screen is showing blank. One of our PC is showing systems and self diagnostic screen, i made my system same as that system(GUI, IE, host entries, JRE) but still i am not able to

  • Error Message: Premature end of JPEG file

    I put a WORD text box on the front page of my association's webpage thru Contribute. When it was time to remove it, I tried, but kept getting a message: Premature end of JPEG file... I finally gave up and had a web designer remove the box but I still

  • How do I move a quick collection of RAW files from one computer to another?

    I will be traveling this weekend I will have all of my pics backed up on my laptop. I will be culling on the flight home. What's the easiest way to move that quick collection to my desktop when I return home? Thank you in advance.