Help - Inserting an XML document into a Oracle 8i Column (CLOB Type)

Hi JavaGurus,
I am looking for a simple java code which will take my XML document as input and insert the same into a Oracle 8i database's column which is of type CLOB.
Insert statement won't work and I can not use SQL Loader.
Any one?
JK

Maybe you can adapt some of the code in Oracle's "LOB Datatype" example, which is a complete working program that stores and retrieves BLOBs and CLOBs.
http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/advanced/advanced.html

Similar Messages

  • Exception when inserting a XML document into database

    Hello.
    I'm trying to insert the content of a XML document into a database. The problem consists on the exception that is raised when a FK in the XML is not in the database as a PK
    How can i catch these exceptions and continuing inserting the rest of the data
    Thanks in advance ...

    I really hope for you this wasn't a production database, as mentioned in the URL, it has been some years ago for me fiddling around this which was btw a supported metalink workaround ONCE (during my Oracle 7 days), but now, I wouldn't be surprised if you now have mixed NLS content in your tables/database and more or less "corrupted" your content.
    The initial issue was probably a client one.
    BTW
    I actually hope it was a production database, maybe then you would learn that way, that you SHOULD NEVER EVER UPDATE DATABASE BASE TABLES directly...
    ...unless (the only exception) you want to learn something about the internals and don't care that your TEST database gets corrupted....

  • How to insert one XML document into another

    Hi,
    I've been working on a simple CMS.
    There is a main template that is just a HTML page. The main template has a few extra 'module' tags that indicates places where individual modules have to be placed.
    main template: template.xml
    <html>
    <body>
    <div>
    <module id="centre"/>
    </div>
    </body>
    </html>module template: module_centre.xml
    <div>
    <a>This is a MODULE and it may be much more complex</a>
    <div>My application has to detect every 'module' tag from the template.xml and insert there XML content from a proper module template.
    The result file has to be generated dynamically on a request. The structures of 'modules' can be only defined in module_*.xml files.
    The expected result
    <html>
      <body>
        <div>
            <div>
                <a>This is a MODULE and it may be much more complex</a>
            <div>
        </div>
      </body>
    </html>What's the best practice do solve this case?
    Pawel

    I think I've came up with a better solution.
    SRC file
    <?xml version="1.0" encoding="utf-8"?>
    <html>
      <head>
        <title></title>
        <style type="text/css">
    div.c4 {background-color:pink;width:400px;height:50px}
    div.c3 {background-color:green}
    div.c2 {background-color:blue;width:400px;height:299px}
    div.c1 {background-color:red}
    </style>
      </head>
      <body>
      <module id="XXX"/>
        <div id="main" class="c3">
          <div id="top" class="c1"><module id="menu_test"/></div>
          <div id="bottom" class="c2"><module id="menu_test2"/></div>
        </div>
        <div id="footer_container" class="c4">    <module id="menu_footer"/></div>
      </body>
    </html>MODULE src file
    <?xml version="1.0" encoding="UTF-8"?>
    <div id="admin_panel_module" style="background-color:orange;width:200px;height:50px">
        <p>Control Panel TEST</p>
    </div> @param source  -  NODES from MODULE document
    *@param target - TEMPLATE document where MODULES are going to be inserted*
    @throws Exception
    public static void insertModules(Node source, Document target) throws Exception {
    Node importedNodes = target.importNode(source, true);
    // Use XPath to find all 'module' nodes in ''
    XPath xpath = XPathFactory.newInstance().newXPath();
    NodeList nodes = (NodeList) xpath.evaluate("//module", target, XPathConstants.NODESET);
    // Remove MODULE node and insert there an XML content from MODULE template
    for (int idx = 0; idx < nodes.getLength(); idx++) {
    Node editedModuleElement = nodes.item(idx);
    // parent of module mode
    Node parentNode = editedModuleElement.getParentNode();
    // replace <module/> node with imported nodes from 'module' XML document
    parentNode.replaceChild(importedNodes, editedModuleElement);
    // nodes.item(idx).appendChild(node);
    importedNodes = target.importNode(source, true);
    }Edited by: maestr0 on May 24, 2010 12:44 AM

  • Examples of hwo to insert an XML file into a field which is of type CLOB

    I am trying to use the following command, but it does not work, due to a type issue, anyone have another example?
    INSERT INTO TEST VALUES (xmltype(bfilename('c:\', 'c:\test.xml') , nls_charset_id('AL32UTF8')));

    I get the following error, probably means the file referenced is not available...
    SQL Error: ORA-22806: not an object or REF
    22806. 00000 - "not an object or REF"
    *Cause:    An attempt was made to extract an attribute from an item that is
    neither an object nor a REF.
    *Action:   Use an object type or REF type item and retry the operation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • XML document into multiple tables

    How to insert a xml document into multiple tables. Eg. Purchase Order having multiple line items. I have to insert xml document into Parent as well as child with different sets of columns.

    I created the tables using the create_ch14_tables.sql. I call it using java -classpath .;C:\commerceone\xpc\lib\xmlparserv2.jar;C:\commerceone\xpc\lib\classes12.zip;C:\commerceone\xpc\lib\xsu12.jar XMLLoader -file deptempdepend.xml -connName default -transform deptempdepend.xsl. The code doesn't seem to like the "<xsl:for-each select="Department">" tags. If I remove them, the insDoc.getDocumentElement().getFirstChild() will find the element, but it still doesn't insert anything into the database.
    Thank You,
    Dave

  • Loading a XML-document into tables

    Hi,
    I have created a view for the tables below.
    Table Book with columns:
    - Book_ID
    - Book_Name
    - Ref_To_Price ( -> is a reference to Table Price (Price_ID))
    Table Price with columns:
    - Price_ID
    - Price_DM
    SQL-Syntax:
    "create view Bookprice as select Book_ID, Book_Name, Ref_To_Price, Price_ID, Price_DM from Book, Price where Ref_To_Price = Price_ID; "
    XML-Document:
    <?xml version="1.0" encoding="UTF-16"?>
    <!DOCTYPE ANWENDUNGEN SYSTEM "file:/E:/book.dtd">
    <!-- ?xml-stylesheet href="book.xsl" type="text/xsl"? -->
    <ROOTDOC>
    <ROW>
    <BOOK_ID>66-77</BOOK_ID>
    <BOOK_NAME>JavaScript</BOOK_NAME>
    <REF_TO_PRICE>12</REF_TO_PRICE>
    <PRICE_ID>12</PRICE_ID>
    <PRICE_DM>25.50DM</PPRICE_DM>
    </ROW>
    </ROOTDOC>
    If I use the XML SQL Utility to insert the XML-Document, the following error message came up:
    " Exception in thread "main" oracle.xml.sql.OracleXMLSQLException: java.sql.SQLException: ORA-01776: cannot modify more than one base table through a join view "
    Can anyone help me, please ?
    null

    Hi,
    This is a classic join view problem, where u cannot update two tables in one shot. The main problem is that ur two tables are not normalized correctly. Why can't they be in just one table?
    OK, if that is not possible, then the best way out is to create a simple INSTEAD OF trigger on the view which will insert correclty,
    e.g.
    CREATE TRIGGER bookprice_tr INSTEAD OF INSERT ON Bookprice FOR EACH ROW
    BEGIN
    insert into Book values (:NEW.Book_id,
    :NEW.Book_name, :NEW.Ref_to_Price);
    insert into Price
    values(:NEW.Price_ID, :NEW.Price_DM);
    END;
    Hope this helps,
    Murali

  • Got error message when store XML documents into XML DB repository, via WebD

    Hi experts,
    I am in I am in Oracle Enterprise Manager 11g 11.2.0.1.0.
    SQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 22 11:40:23 2011
    I got error message when store XML documents into XML DB repository, via WebDAV.
    I have successfully registered 5 related schemas and generated 1 table.
    I have inserted 40 .xml files into this auto generated table.
    using these data I created relational view successfully.
    but since I couldn't store XML documents into XML DB repository, via WebDAV
    when I query using below code:
    SELECT rv.res.getClobVal()
    FROM resource_view rv
    WHERE rv.any_path = '/home/DEV/messages/4fe1-865d-da0db9212f34.xml';
    I got nothing.
    My ftp code is listed below:
    ftp> open localhost 2100
    Connected to I0025B368E2F9.
    220- C0025B368E2F9
    Unauthorised use of this FTP server is prohibited and may be subject to civil and criminal prosecution.
    220 I0025B368E2F9 FTP Server (Oracle XML DB/Oracle Database) ready.
    User (I0025B368E2F9:(none)): fda_xml
    331 pass required for FDA_XML
    Password:
    230 FDA_XML logged in
    ftp> cd /home/DEV/message
    250 CWD Command successful
    ftp> pwd
    257 "/home/DEV/message" is current directory.
    ftp> ls -la
    200 PORT Command successful
    150 ASCII Data Connection
    drw-r--r-- 2 FDA_XML oracle 0 DEC 17 19:19 .
    drw-r--r-- 2 FDA_XML oracle 0 DEC 17 19:19 ..
    226 ASCII Transfer Complete
    ftp: 115 bytes received in 0.00Seconds 115000.00Kbytes/sec.
    250 SET_CHARSET Command Successful
    ftp> put C:\ED\SPL\E_Reon_Data\loaded\4fe1-865d-da0db9212f34.xml
    200 PORT Command successful
    150 ASCII Data Connection
    550- Error Response
    ORA-00600: internal error code, arguments: [qmxConvUnkType], [], [], [], [], [], [], [], [], [], [], []
    550 End Error Response
    ftp: 3394 bytes sent in 0.00Seconds 3394000.00Kbytes/sec.
    I have tried all suggestion from another thread such as:
    alter system set events ='31150 trace name context forever, level 0x4000'
    SQL> alter system set shared_servers = 1;
    but failed.
    is there anyone can help?
    Thanks.
    Edited by: Cow on Mar 29, 2011 12:58 AM

    Hi experts,
    I am in I am in Oracle Enterprise Manager 11g 11.2.0.1.0.
    SQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 22 11:40:23 2011
    I got error message when store XML documents into XML DB repository, via WebDAV.
    I have successfully registered 5 related schemas and generated 1 table.
    I have inserted 40 .xml files into this auto generated table.
    using these data I created relational view successfully.
    but since I couldn't store XML documents into XML DB repository, via WebDAV
    when I query using below code:
    SELECT rv.res.getClobVal()
    FROM resource_view rv
    WHERE rv.any_path = '/home/DEV/messages/4fe1-865d-da0db9212f34.xml';
    I got nothing.
    My ftp code is listed below:
    ftp> open localhost 2100
    Connected to I0025B368E2F9.
    220- C0025B368E2F9
    Unauthorised use of this FTP server is prohibited and may be subject to civil and criminal prosecution.
    220 I0025B368E2F9 FTP Server (Oracle XML DB/Oracle Database) ready.
    User (I0025B368E2F9:(none)): fda_xml
    331 pass required for FDA_XML
    Password:
    230 FDA_XML logged in
    ftp> cd /home/DEV/message
    250 CWD Command successful
    ftp> pwd
    257 "/home/DEV/message" is current directory.
    ftp> ls -la
    200 PORT Command successful
    150 ASCII Data Connection
    drw-r--r-- 2 FDA_XML oracle 0 DEC 17 19:19 .
    drw-r--r-- 2 FDA_XML oracle 0 DEC 17 19:19 ..
    226 ASCII Transfer Complete
    ftp: 115 bytes received in 0.00Seconds 115000.00Kbytes/sec.
    250 SET_CHARSET Command Successful
    ftp> put C:\ED\SPL\E_Reon_Data\loaded\4fe1-865d-da0db9212f34.xml
    200 PORT Command successful
    150 ASCII Data Connection
    550- Error Response
    ORA-00600: internal error code, arguments: [qmxConvUnkType], [], [], [], [], [], [], [], [], [], [], []
    550 End Error Response
    ftp: 3394 bytes sent in 0.00Seconds 3394000.00Kbytes/sec.
    I have tried all suggestion from another thread such as:
    alter system set events ='31150 trace name context forever, level 0x4000'
    SQL> alter system set shared_servers = 1;
    but failed.
    is there anyone can help?
    Thanks.
    Edited by: Cow on Mar 29, 2011 12:58 AM

  • Help inserting a flash video into my web page

    Hello!
    I'd love some help inserting a flash video into my web page. My web page is hosted by Viviti, templated, and edited online. I can add html to it, and I have the html source for my flash video. I also have uploaded the flash file to the server. Since I am very html illiterate, though, I need some help rewriting the html script so it can be published. There are two problems- firstly, no 'headers' or 'body' allowed in the script- these are already a part of the template. Secondly, I don't know how to rewrite it to refer to the uploaded files. It's also imperative that the full screen mode functions. I've pasted the source code for the flash video here. Please help!!!
    Thanks!
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Drag and drop labelling</title>
    <script language="JavaScript" type="text/javascript">
    <!--
    //v1.7
    // Flash Player Version Detection
    // Detect Client Browser type
    // Copyright 2005-2008 Adobe Systems Incorporated.  All rights reserved.
    var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
    var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
    var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
    function ControlVersion()
         var version;
         var axo;
         var e;
         // NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry
         try {
              // version will be set for 7.X or greater players
              axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
              version = axo.GetVariable("$version");
         } catch (e) {
         if (!version)
              try {
                   // version will be set for 6.X players only
                   axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
                   // installed player is some revision of 6.0
                   // GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
                   // so we have to be careful.
                   // default to the first public version
                   version = "WIN 6,0,21,0";
                   // throws if AllowScripAccess does not exist (introduced in 6.0r47)          
                   axo.AllowScriptAccess = "always";
                   // safe to call for 6.0r47 or greater
                   version = axo.GetVariable("$version");
              } catch (e) {
         if (!version)
              try {
                   // version will be set for 4.X or 5.X player
                   axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
                   version = axo.GetVariable("$version");
              } catch (e) {
         if (!version)
              try {
                   // version will be set for 3.X player
                   axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
                   version = "WIN 3,0,18,0";
              } catch (e) {
         if (!version)
              try {
                   // version will be set for 2.X player
                   axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
                   version = "WIN 2,0,0,11";
              } catch (e) {
                   version = -1;
         return version;
    // JavaScript helper required to detect Flash Player PlugIn version information
    function GetSwfVer(){
         // NS/Opera version >= 3 check for Flash plugin in plugin array
         var flashVer = -1;
         if (navigator.plugins != null && navigator.plugins.length > 0) {
              if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
                   var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
                   var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
                   var descArray = flashDescription.split(" ");
                   var tempArrayMajor = descArray[2].split(".");               
                   var versionMajor = tempArrayMajor[0];
                   var versionMinor = tempArrayMajor[1];
                   var versionRevision = descArray[3];
                   if (versionRevision == "") {
                        versionRevision = descArray[4];
                   if (versionRevision[0] == "d") {
                        versionRevision = versionRevision.substring(1);
                   } else if (versionRevision[0] == "r") {
                        versionRevision = versionRevision.substring(1);
                        if (versionRevision.indexOf("d") > 0) {
                             versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
                   var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
         // MSN/WebTV 2.6 supports Flash 4
         else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
         // WebTV 2.5 supports Flash 3
         else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
         // older WebTV supports Flash 2
         else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
         else if ( isIE && isWin && !isOpera ) {
              flashVer = ControlVersion();
         return flashVer;
    // When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
    function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
         versionStr = GetSwfVer();
         if (versionStr == -1 ) {
              return false;
         } else if (versionStr != 0) {
              if(isIE && isWin && !isOpera) {
                   // Given "WIN 2,0,0,11"
                   tempArray         = versionStr.split(" ");      // ["WIN", "2,0,0,11"]
                   tempString        = tempArray[1];               // "2,0,0,11"
                   versionArray      = tempString.split(",");     // ['2', '0', '0', '11']
              } else {
                   versionArray      = versionStr.split(".");
              var versionMajor      = versionArray[0];
              var versionMinor      = versionArray[1];
              var versionRevision   = versionArray[2];
                 // is the major.revision >= requested major.revision AND the minor version >= requested minor
              if (versionMajor > parseFloat(reqMajorVer)) {
                   return true;
              } else if (versionMajor == parseFloat(reqMajorVer)) {
                   if (versionMinor > parseFloat(reqMinorVer))
                        return true;
                   else if (versionMinor == parseFloat(reqMinorVer)) {
                        if (versionRevision >= parseFloat(reqRevision))
                             return true;
              return false;
    function AC_AddExtension(src, ext)
      if (src.indexOf('?') != -1)
        return src.replace(/\?/, ext+'?');
      else
        return src + ext;
    function AC_Generateobj(objAttrs, params, embedAttrs)
      var str = '';
      if (isIE && isWin && !isOpera)
        str += '<object ';
        for (var i in objAttrs)
          str += i + '="' + objAttrs[i] + '" ';
        str += '>';
        for (var i in params)
          str += '<param name="' + i + '" value="' + params[i] + '" /> ';
        str += '</object>';
      else
        str += '<embed ';
        for (var i in embedAttrs)
          str += i + '="' + embedAttrs[i] + '" ';
        str += '> </embed>';
      document.write(str);
    function AC_FL_RunContent(){
      var ret =
        AC_GetArgs
        (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
         , "application/x-shockwave-flash"
      AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
    function AC_SW_RunContent(){
      var ret =
        AC_GetArgs
        (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
         , null
      AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
    function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
      var ret = new Object();
      ret.embedAttrs = new Object();
      ret.params = new Object();
      ret.objAttrs = new Object();
      for (var i=0; i < args.length; i=i+2){
        var currArg = args[i].toLowerCase();   
        switch (currArg){     
          case "classid":
            break;
          case "pluginspage":
            ret.embedAttrs[args[i]] = args[i+1];
            break;
          case "src":
          case "movie":     
            args[i+1] = AC_AddExtension(args[i+1], ext);
            ret.embedAttrs["src"] = args[i+1];
            ret.params[srcParamName] = args[i+1];
            break;
          case "onafterupdate":
          case "onbeforeupdate":
          case "onblur":
          case "oncellchange":
          case "onclick":
          case "ondblclick":
          case "ondrag":
          case "ondragend":
          case "ondragenter":
          case "ondragleave":
          case "ondragover":
          case "ondrop":
          case "onfinish":
          case "onfocus":
          case "onhelp":
          case "onmousedown":
          case "onmouseup":
          case "onmouseover":
          case "onmousemove":
          case "onmouseout":
          case "onkeypress":
          case "onkeydown":
          case "onkeyup":
          case "onload":
          case "onlosecapture":
          case "onpropertychange":
          case "onreadystatechange":
          case "onrowsdelete":
          case "onrowenter":
          case "onrowexit":
          case "onrowsinserted":
          case "onstart":
          case "onscroll":
          case "onbeforeeditfocus":
          case "onactivate":
          case "onbeforedeactivate":
          case "ondeactivate":
          case "type":
          case "codebase":
          case "id":
            ret.objAttrs[args[i]] = args[i+1];
            break;
          case "width":
          case "height":
          case "align":
          case "vspace":
          case "hspace":
          case "class":
          case "title":
          case "accesskey":
          case "name":
          case "tabindex":
            ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
            break;
          default:
            ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
      ret.objAttrs["classid"] = classid;
      if (mimeType) ret.embedAttrs["type"] = mimeType;
      return ret;
    // -->
    </script>
    </head>
    <body bgcolor="#ffffff">
    <!--url's used in the movie-->
    <!--text used in the movie-->
    <!-- saved from url=(0013)about:internet -->
    <script language="JavaScript" type="text/javascript">
         AC_FL_RunContent(
              'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0',
              'width', '720',
              'height', '440',
              'src', 'Drag and drop labelling',
              'quality', 'medium',
              'pluginspage', 'http://www.adobe.com/go/getflashplayer',
              'align', 'middle',
              'play', 'true',
              'loop', 'true',
              'scale', 'showall',
              'wmode', 'window',
              'devicefont', 'false',
              'id', 'Drag and drop labelling',
              'bgcolor', '#ffffff',
              'name', 'Drag and drop labelling',
              'menu', 'true',
              'allowFullScreen', 'true',
              'allowScriptAccess','sameDomain',
              'movie', 'Drag and drop labelling',
              'salign', ''
              ); //end AC code
    </script>
    <noscript>
         <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="720" height="440" id="Drag and drop labelling" align="middle">
         <param name="allowScriptAccess" value="sameDomain" />
         <param name="allowFullScreen" value="true" />
         <param name="movie" value="Drag and drop labelling.swf" /><param name="quality" value="medium" /><param name="bgcolor" value="#ffffff" />     <embed src="Drag and drop labelling.swf" quality="medium" bgcolor="#ffffff" width="720" height="440" name="Drag and drop labelling" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
         </object>
    </noscript>
    </body>
    </html>

    What you basically need to do is copy the sections of content from the code you show into the template (assuming the template already provides the <head> and <body> sections of the page.  So in the head section of what you show, take everything starting with...
    <script language="JavaScript" type="text/javascript">
    all the way down thru...
    </script>
    , inclusive (in the head section only), and paste that into the head section of your template.
    Similarly, take everything that lies between the <body> ... </body> tags (exclusive of the body tags) and paste it into the body section of your template wherever you plan to display the Flash file.

  • How to ftp XML document into a XML type which is not created by itself.

    Hi,
    1.
    I have a table call SNPLEX_DESIGN which is created automaticly when I register a snplex_design.xsd XML schema.( Oracle creates it through the xdb:defaultTable="SNPLEX_DESIGN attribute). and it is created using SNPLEX user account.
    2.
    I also created a folder (resource) call /home/SNPLEX/Orders. which is used to hold all the incoming XML document.
    3.
    I created another user account call SNPLEX_APP, which is the only user account allowed to FTP XML document into /home/SNPLEX/Orders folder.
    Isuues,
    If I login as SNPLEX user, I can ftp XML document into the folder and TABLE (the file size = 0). But If I login as SNPLEX_APP user account, I can only ftp XML document into the folder, but Oracle doesn't store the document into the table( becuase the files size shows a number).
    I have granted all the ACL privileges on the /home/SNPEX/Orders folder to SNPLEX_APP hrough OEM.
    DO I miss anything. Any helps will be great appreciated. Resolve this issues is very import to us, sicne we are on a stage to roll system into production.
    Regards,
    Jinsen

    IN order for a registered schema to be available to other users the schema must be registered as a GLOBAL, rather than a LOCAL Schema. This is controlled by the third agument passed to registerSChema, and the default is local. Note that you will also need to explicity grant appropriate permissions on any tables created by the schema registration process to other users who will be loading or reading data from these tables.

  • Loading XML Document into Structured Storage

    HI Everybody,
    I am confronted with a BUG in Oracle which is being fixed but will last a long time. I have a relatively complex Schema with manifold includes, imports and inheritances which I can register successfully. The object-relational table is also generated. But loading the instance document with INSERT INTO... fails due to severe internal error. I have not yet tried SQL*Loader, however.
    Please, does anyone know a safe alternative method to parse and load? Structured storage is mandatory because I need to retrieve individual elements and attributes. Instance documents are big, ca. 20 MB.
    Thanks, regards
    Miklos HERBOLY

    HI,
    Oracle version is 11.1.0.7.0.
    Metalink found three bugs related to the error ORA-00600: Interner Fehlercode, Argumente: [qmxConvUnkType], [], [], [], [],
    The bugs are:
    BUG 8644684 ORA-600 [QMXCONVUNKTYPE] DURING INSERT INTO SCHEMA-BASED TABLE
    BUG 8671408 INSERT OF XML DOC INTO AN XML SCHEMA STORED AS BINARY XML FAILS WITH ORA-30937
    BUG 8683472 SCHEMA EXECUTABLE RETURNS INCORRECT ERRORS DURING VALIDATION AGAINST XML SCHEMA
    Well, I have to look round in XML DB Forum yet.

  • To load an XML document into 40 tables

    How do I load a large XML document into 40 tables. Most of the exmaples, I see only load one table into the Orcale database?

    From the above document:
    Storing XML Data Across Tables
    Question
    Can XML- SQL Utility store XML data across tables?
    Answer
    Currently XML-SQL Utility (XSU) can only store to a single table. It maps a canonical representation of an XML document into any table/view. But of course there is a way to store XML with the XSU across table. One can do this using XSLT to transform any document into multiple documents and insert them separately. Another way is to define views over multiple tables (object views if needed) and then do the inserts ... into the view. If the view is inherently non-updatable (because of complex joins, ...), then one can use INSTEAD-OF triggers over the views to do the inserts.
    -- I've tried this, works fine.

  • How to insert a PDF document into a Word file?

    I'm using Acrobat Standard 9 and Microsoft Word 2010 and I'm unable to insert a PDF document into a Word file. Operating system is Windows 7 Enterprize. Can someone help?

    Thanks for the reply, Bill. 
    Yes, let me elaborate further:
    I have a four page document in WORD with instructions. Examples of the instructions are in PDF files. I want to insert each PDF example next to or below each line item in WORD.The PDF will open when clicking on the icon without having a hyperlink attached to it.  

  • Can I append an XML Document into another?

    I have a large xml document which I open into coldfusion (mx
    7), and then a smaller group of files that are opened into thier
    own xml objects. After some customization of xml text values, I
    want to append the smaller xml documents into the larger document
    at specific positions within the document tree.
    I have the code that I thought would do this, using an
    arrayappend function, but what happens is that only the root
    element of the smaller (inserted) xml document is placed into the
    main document.
    Is this possible, or do I need to modify the code so that the
    entire tree of xml data that I am appending is created on the
    fly?

    Personally I do this with XSLT.
    <cfxml variable="doc1">
    <root>
    <member id="10">
    <name>Ian</name>
    <sex>male</sex>
    </member>
    </root>
    </cfxml>
    <cfxml variable="doc2">
    <root>
    <member id="1">
    <name>Joe</name>
    <sex>male</sex>
    </member>
    <member id="2">
    <name>John</name>
    <sex>male</sex>
    </member>
    <member id="3">
    <name>Sue</name>
    <sex>female</sex>
    </member>
    </root>
    </cfxml>
    <cffile action="write" file="#expandPath("/")#\doc2.xml"
    output="#ToString(doc2)#" nameconflict="overwrite">
    <!--- METHOD ONE using a depreciated and undocumented
    method --->
    <cfset newNode = doc1.root.member.cloneNode(true)>
    <cfset doc2.changeNodeOwner(newNode)>
    <cfset doc2.root.appendChild(newNode)>
    <cfdump var="#doc2#" label="Merged by hidden functions"
    expand="no">
    <!--- METHOD TWO using XSLT --->
    <!--- create an xsl docutment--->
    <cfoutput>
    <cfsavecontent variable="transformer">
    <xsl:stylesheet xmlns:xsl="
    http://www.w3.org/1999/XSL/Transform"
    version="1.0">
    <xsl:output method="xml"/>
    <!--load the merge file -->
    <xsl:variable name="emps"
    select="document('#expandPath("/")#\doc2.xml')"/>
    <!--- this line references and XML file to be combined
    with the main file,
    I wonder if there is a way to use an XML document in memory
    here? --->
    <!-- combine the files -->
    <xsl:template match="/">
    <root>
    <!-- select all the child nodes of the root tag in the
    main file -->
    <xsl:for-each select="root/child::*">
    <!-- copy the member tag -->
    <xsl:copy-of select="."/>
    </xsl:for-each>
    <!-- and all the child nodes of the root tag in the merge
    file -->
    <xsl:for-each select="$emps/root/child::*">
    <!-- copy the member tag -->
    <xsl:copy-of select="."/>
    </xsl:for-each>
    </root>
    </xsl:template>
    </xsl:stylesheet>
    </cfsavecontent>
    </cfoutput>
    <!--- create a combined xml document --->
    <cfset doc2 = XMLparse(XMLtransform(doc1,transformer))>
    <cfdump var="#doc2#" label="Merged by XSLT"
    expand="no">

  • Insert a XSL document into XMLType

    Hi dear reader
    I want to insert a XSL document into XMLType field , but the length of the XSL is 5900 character and I have problem with loading and executing the INSERT statement in database.
    for solving the load problem , I use binding variable and try to execute it with EXECUTE IMMEDIATE str.
    and get the following error :
    ORA-01704: string literal too long
    please advice;
    thanks

    create directory object DIR_TEMP on the database pointing to the physical path where your xml files are available.
    Note the path should be on the database server and not on the client and also your files should be present on the database server and not client for this to work.
    create table xml_table (id number, xml_data xmltype)
    CREATE OR REPLACE FUNCTION getClobDocument
    ( filename  in varchar2,
      charset   in varchar2 default NULL,
      dir       IN VARCHAR2 default 'DIR_TEMP',
    ) RETURN CLOB deterministic is
      file          bfile := bfilename(dir,filename);
      charContent   CLOB := ' ';
      targetFile    bfile;
      lang_ctx      number := DBMS_LOB.default_lang_ctx;
      charset_id    number := 0;
      src_offset    number := 1 ;
      dst_offset    number := 1 ;
      warning       number;
    BEGIN
      IF charset is not null then
          charset_id := NLS_CHARSET_ID(charset);
      end if;
      targetFile := file;
      DBMS_LOB.fileopen(targetFile, DBMS_LOB.file_readonly);
      DBMS_LOB.LOADCLOBFROMFILE(charContent, targetFile,
      DBMS_LOB.getLength(targetFile), src_offset, dst_offset,
      charset_id, lang_ctx,warning);
      DBMS_LOB.fileclose(targetFile);
      return charContent;
    end;
    insert into xml_table values(1, XMLTYPE(GetClobDocument('purchaseorder.xml')))
    /The function GetClobDocument returns the content of the xml file in CLOB format.
    Before insert this is converted into XMLTYPE.

  • Need to Load data in XML file into multiple Oracle tables

    Experts
    I want to load data that is stored at XML file into multiple Oracle table using plsql.
    I am novice in this area.Kindly explain in depth or step by step so that i can achive this.
    Thanks in advnace.

    Hi,
    extract your xml and then you can use insert all clause.
    here's very small example on 10.2.0.1.0
    SQL> create table table1(id number,val varchar2(10));
    Table created.
    SQL> create table table2(id number,val varchar2(10));
    Table created.
    SQL> insert all
      2  into table1 values(id,val)
      3  into table2 values(id2,val2)
      4  select extractValue(x.col,'/a/id1') id
      5        ,extractValue(x.col,'/a/value') val
      6        ,extractValue(x.col,'/a/value2') val2
      7        ,extractValue(x.col,'/a/id2') id2
      8  from (select xmltype('<a><id1>1</id1><value>a</value><id2>2</id2><value2>b</value2></a>') col from dual) x;
    2 rows created.
    SQL> select * from table1;
            ID VAL                                                                 
             1 a                                                                   
    SQL> select * from table2;
            ID VAL                                                                 
             2 b                                                                    Ants

Maybe you are looking for

  • Unable to assign the service material to campaign

    Hi Experts, When i tried to assign service material to Campaign for giving offers to customers through Campaign i am getting below error. Can anybody help me to solve this issue. error: Invalid Parent Category for product SRV_BALANCING Regards Nagara

  • Complex file receiver content conversion

    Hi My challenge is to change this xml structure to a flat file structure using content conversion in a file receiver adapter. My problem is, that I have a record within a record and both records can occur multiple times: <statusUpdate_response>    <P

  • Trying to import VMDK and VMX files into Oracle VM

    I was given a copy of a VM built in VMWare with the files in VMDK and VMX formats. I've tried various methods of importing these into OVM x86 with no luck. According to this 2009 blog post from Oracle it should be possible (at least with that older r

  • Need Help 27inch iMac died.

    I tried to fix the drive in recovery mode without success.  Now trying to save data from the iMac but my Macbook cannot connect to the drive when I connect firewire.

  • I am unable to email pictures help

    my contacts are not receiving the pictures in my emails