Load data from xml file in oracle data base

Hi all,
I'd like to know if is posible to load data from a file xml into a table of oracle data base through SQL*LOADER, loaded only in a normal column no with type XMLType , for example
I have a xml file
<person name="kate" surname="fari" city="new york" >
<son name="faus" age="18"/>
<son name="doly" age="10"/>
</person>
and I load in table :
table :person
column
name surname city
kate fari new york
table : son
name age
doly 10
faus 18
thank you for your return !!!!!!!!!
Ninova
Edited by: user10474037 on 30 mai 2011 08:47
Edited by: user10474037 on 30 mai 2011 08:48
Edited by: user10474037 on 30 mai 2011 08:48
Edited by: user10474037 on 30 mai 2011 08:49
Edited by: user10474037 on 30 mai 2011 08:50

Hi
This May be found at
SQL Loader to upload XML file

Similar Messages

  • Extract data from XML file to Oracle database

    Dear All
    Please let me know, how to extract data from XML file to Oracle database which includes texts & images.
    Thanking You
    Regards Lakmal Marasinghe

    I would do it from the database, but then again, I am a database / PL/SQL guy.
    IMHO the database will deliver you with more options. I don't know about "speed" between the two.

  • Storing data from XML files in Oracle DB

    Hi!
    I just started to work with XML and need to save data from XML files into Oracle database. I tried to run sample from Oracle web site. The code was following:
    public class xmlwritedb
    public static void main(String args[]) throws SQLException
    String tabName = "EMP"; // Table into which to insert XML data
    String fileName = "emp.xml"; // XML document filename
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    // Initialize a JDBC connection
    Connection conn =
    DriverManager.getConnection("jdbc:oracle:oci8:scott/tiger@");
    // Insert XML data from file (filename) into
    // database table (tabName)
    OracleXMLSave save = new OracleXMLSave(conn, tabName);
    URL url = save.createURL(fileName);
    int rowCount = save.insertXML(url);
    System.out.println(" successfully inserted "+rowCount+
    " rows into "+ tabName);
    conn.close();
    But it does not work.
    OracleXMLSave object does not see file name.
    Please, help me solve this problem. Also,where is it possible to find any documentation on oracle.xml.* classes API.
    Thank you.
    Maya.
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by sudeepk:
    If a java exception is thrown probably during ur install u might have forgotten
    grant javauserpriv to scott;
    grant javasyspriv to scott;
    Thanks
    [email protected]
    <HR></BLOCKQUOTE>
    Thank you!!!

  • Extract data from xml file to Oracle table

    hello to all members of forum..i have this stored procedures:
    create or replace
    PROCEDURE INSERTXML2(
    p_xml_in XMLType,
    p_table IN VARCHAR2 ) AS
    v_context DBMS_XMLStore.ctxType;
    v_rows NUMBER;
    BEGIN
    insCtx := DBMS_XMLStore.newContext(p_table); -- get saved context
    dbms_xmlstore.setRowTag(insCtx,'Row');
    DBMS_XMLStore.clearUpdateColumnList(insCtx); -- clear the update settings
    -- set the columns to be updated as a list of values
    DBMS_XMLStore.setUpdateColumn(insCtx,'ORDERNUMBER');
    DBMS_XMLStore.setUpdateColumn(insCtx,'PLANT');
    DBMS_XMLStore.setUpdateColumn(insCtx,'MATERIAL');
    DBMS_XMLStore.setUpdateColumn(insCtx,'LINENUMBER');
    DBMS_XMLStore.setUpdatecolumn(insCtx,'NOMSPEED');
    DBMS_XMLStore.setUpdatecolumn(insCtx,'STARTDATE');
    DBMS_XMLStore.setUpdatecolumn(insCtx,'FINISHDATE');
    DBMS_XMLStore.setUpdatecolumn(insCtx,'TARGETQTY');
    DBMS_XMLStore.setUpdatecolumn(insCtx,'UNIT');
    DBMS_XMLStore.setUpdatecolumn(insCtx,'SYSTEMSTATUS');
    v_rows := DBMS_XMLStore.insertXML(insCtx, xmldocument);
    -- Close the context
    DBMS_XMLStore.closeContext(insCtx);
    END;
    that works well in little XML files but in XML files that are bigger the stored procedures to not work because string maximum length in Oracle is 4000..can anyone know a solution to pass over this problem?!?!
    one more thing im working with Oracle SQL Developer and Sap Mii, the XML file is generated in Sap Mii and then i have to pass it in one step to database..my one step is this stored procedure
    one more thing im working with Oracle SQL developer and SAP Mii
    regards and thanks in advance
    matinha
    Edited by: user11098081 on 23/Abr/2009 7:11

    You can use CLOB for big files.
    http://saubbane.blogspot.com/2010/12/saving-xml-file-into-table-with-plsql.html

  • Data Load from XML file to Oracle Table

    Hi,
    I am trying to load data from XML file to Oracle table using DBMS_XMLStore utility.I have performed the prerequisites like creating the directory from APPS user, grant read/write to directory, placing the data file on folder on apps tier, created a procedure ‘insertXML’ to load the data based on metalink note (Note ID: 396573.1 How to Insert XML by passing a file Instead of using Embedded XML). I am running the procedure thru below anonymous block  to insert the data in the table.
    Anonymous block
    declare
      begin
      insertXML('XMLDIR', 'results.xml', 'employee_results');
      end;
    I am getting below error after running the anonymous block.
    Error :     ORA-22288: file or LOB operation FILEOPEN failed”
    Cause :   The operation attempted on the file or LOB failed.
    Action:   See the next error message in the error stack for more detailed
               information.  Also, verify that the file or LOB exists and that
               the necessary privileges are set for the specified operation. If
               the error still persists, report the error to the DBA.
    I searched this error on metalink and found DOC ID 1556652.1 . I Ran the script provided in the document. PFA the script.
    Also, attaching a document that list down the steps that I have followed.
    Please check and let me know if I am missing something in the process. Please help to get this resolve.
    Regards,
    Sankalp

    Thanks Bashar for your prompt response.
    I ran the insert statement but encountered error,below are the error details. statement.
    Error report -
    SQL Error: ORA-22288: file or LOB operation FILEOPEN failed
    No such file or directory
    ORA-06512: at "SYS.XMLTYPE", line 296
    ORA-06512: at line 1
    22288. 00000 -  "file or LOB operation %s failed\n%s"
    *Cause:    The operation attempted on the file or LOB failed.
    *Action:   See the next error message in the error stack for more detailed
               information.  Also, verify that the file or LOB exists and that
               the necessary privileges are set for the specified operation. If
               the error still persists, report the error to the DBA.
    INSERT statement I ran
    INSERT INTO employee_results (USERNAME,FIRSTNAME,LASTNAME,STATUS)
        SELECT *
        FROM XMLTABLE('/Results/Users/User'
               PASSING XMLTYPE(BFILENAME('XMLDIR', 'results.xml'),
               NLS_CHARSET_ID('CHAR_CS'))
               COLUMNS USERNAME  NUMBER(4)    PATH 'USERNAME',
                       FIRSTNAME  VARCHAR2(10) PATH 'FIRSTNAME',
                       LASTNAME    NUMBER(7,2)  PATH 'LASTNAME',
                       STATUS  VARCHAR2(14) PATH 'STATUS'
    Regards,
    Sankalp

  • Loading data from .csv file into Oracle Table

    Hi,
    I have a requirement where I need to populate data from .csv file into oracle table.
    Is there any mechanism so that i can follow the same?
    Any help will be fruitful.
    Thanks and regards

    You can use Sql Loader or External tables for your requirement
    Missed Karthick's post ...alredy there :)
    Edited by: Rajneesh Kumar on Dec 4, 2008 10:54 AM

  • How to load the data from .csv file to oracle table???

    Hi,
    I am using oracle 10g , plsql developer. Can anyone help me in how to load the data from .csv file to oracle table. The table is already created with the required columns. The .csv file is having about 10lakh records. Is it possible to load 10lakh records. can any one please tell me how to proceed.
    Thanks in advance

    981145 wrote:
    Can you tell more about sql * loader??? how to know that utility is available for me or not??? I am using oracle 10g database and plsql developer???SQL*Loader is part of the Oracle client. If you have a developer installation you should normally have it on your client.
    the command is
    sqlldrType it and see if you have it installed.
    Have a look also at the FAQ link posted by Marwin.
    There are plenty of examples also on the web.
    Regards.
    Al

  • Error when loading data from xml file

    Hi,
    I'm trying to load data into a table from XML file using ApEx DATA UNLOAD/LOAD interfaces .
    ApEx version is 3.0.1 .
    I'm getting this error:
    ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing LPX-00222: error received from SAX callback function
    How to find cause of the error ?
    Janus

    Tkank you for the simple but good advice :)
    unfortunately even google didn't find many answers :
    LPX-00222 + APEX ... NOTHING
    LPX-00222 + ORA- ... 2 pages of something like
    "Examine the additional error messages and take corrective action"

  • Load data from XML files into BI

    Hi All,
    Can any one guide me through the steps which involve in loading data from XML files into BI?
    Thanks
    Santosh

    Hi James,
    I have followed upto step No: 12 .
    Please could you let me know how to link the XML file on my local drive to BI,
    I am not able to find figure out where to specify the path of the XML file to be loaded into BI.
    Thanks In Advance
    Regards,
    San
    1. Create a Infosource(ZIS), with transfer structure in accordance with the structure in the XML file. (You can open the XML file with MS Excel.This way you can get to know the structure).
    2. Activate the transfer rules.
    3. After activation ;from the Menu Bar , Select Extras>Create BW Datasource with SOAP connection.
    4.Now Activate the Infosurce again, this creates an XML based Datasource(6AXXX...)
    5.These steps would create two sub nodes under the Infosource(ZIS).
    6.Select Myself system and create a data package and execute it run in Init mode(without Data Transfer).
    7. This would create an entry in RSA7(BW delta Queue)
    8. Again create another Delta Infopackage under it, and run it. Now the Datasource(6AXXXXXX..) would turn green in RSA7.
    9.In Function builder(SE37) select your FM( do a search ,F4, on the datasource 6AXXX....) .
    10.Inside this RFC based FM , from the Menu Bar select Utilities>more Utilities>Create Web services>From Function module.
    11.A wizard will guide you through the next steps .
    12.once this is done a Web serrvice would be enabled in WSADMIN. Select your FM and execute it.
    13.From here you can upload the data from XML file into BW delta queue.
    Edited by: Santosh on Nov 30, 2008 2:22 PM

  • Upload data from excel file to Oracle table

    Dear All,
    I have to upload data from excel file to Oracle table without using third party tools and without converting into CSV file.
    Could you tell me please how can i do this using PLSQl or SQL Loader.
    Thnaks in Advance..

    Dear All,
    I have to upload data from excel file to
    Oracle table without using third party tools and
    without converting into CSV file.
    Could you tell me please how can i do this
    using PLSQl or SQL Loader.
    Thnaks in Advance..As billy mentioned using ODBC interface ,the same HS service which is a layer over using traditional ODBC to access non oracle database.Here is link you can hit and trial and come out here if you have any problem.
    http://www.oracle-base.com/articles/9i/HSGenericConnectivity9i.php[pre]
    Khurram                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Reading data From XML file and setting into ViewObject to Pouplate ADF UI

    Hi,
    I have following requirement.
    I would like to read data from XML file and populate the data in ViewObject so that the data can be displayed in the ADF UI.
    Also when user modifies the data in the ADF UI, it should be modified back into to ViewObject.
    Here is an example - XML file contains Book Title and Author. I would like to read Book Title and Author from XML file and set it into ViewObject Attribute and then display Book title and Author in ADF UI page. Also when user modifies Book title and Author, I would like to store it back in View Object.
    Please help me with this requirement and let me know if any solution exist in ADF, for populating the ADF UI screen fields with external XML file data.
    Thanks

    Read chapter 42 http://download.oracle.com/docs/cd/E16162_01/web.1112/e16182/bcadvvo.htm of the fusion developer guide
    Section 42.7, "Reading and Writing XML"
    Section 42.8, "Using Programmatic View Objects for Alternative Data Sources"
    Timo

  • Extract data from xml file and insert into another exiting xml fil

    hello,
    i am searching extract data from xml file and insert into another exiting xml file by a java program. I understood it is easy to extract data from a xml file, and how ever without creating another xml file. We want to insert the extracted data into another exiting xml file. Suggestions?
    Regards,
    Zhuozhi

    If the files are small, you can load the target file in a DOM document, insert the data from the source file and persist the DOM.
    If the files are large, you probably want to use a StAX or SAX.

  • Upload Data From XML File !!!!!

    Hi,
    I want to upload data in oracle from XML file. The data will look like the below sample;
    <Transaction>
         <Data>
              <EMP class="R">
                   <Empno IsChanged="Y">7839</Empno>
                   <Ename IsChanged="Y">"TEST"</Ename>
                   <Emp_Hist class="R">
                        <Join_Date IsChanged="Y">2009-09-10</Join_Date>
                   </Emp_Hist>
                        <Emp_Sal class="R">
                        <Basic IsChanged="Y">5000</Basic>
                        </Emp_Sal>
              </EMP>
         </Data>
    </Transaction>
    any suggestion regarding above query? I am using Oracle Database 10g Enterprise Edition Release 10.2.0.1.0. Please guide me for resolving the above issue.
    Thanks.

    So what's wrong with the answers you got at {message:id=3871099}?

  • Reads data from xml file

    i need a procedure that reads data from xml file and stores into an oracle table.

    Hi,
    Check the below links:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:27523665852829
    http://www.experts-exchange.com/Database/Oracle/Q_20932242.html
    Best regards,
    Rafi.
    http://rafioracledba.blogspot.com

  • Pls Help me with steps to add data from xml file to SAP B1 through B1iSN.

    Pls Help me with steps to add data from xml file to SAP B1 through B1iSN. I  am getting stuck in xsl transformation. not able to understand where the mapping code needs to be added.
    Pls explain me the steps for adding data from xml to B1 quotation step by step.
    thanks and regards
    Priya

    Hi,
    Have you checked this: https://sap.na.pgiconnect.com/p45508295/?launcher=false&fcsContent=true&pbMode=normal ?
    Thanks,
    Gordon

Maybe you are looking for

  • ITunes and Quicktime update

    I have tried for weeks to install the update for iTunts and Quicktime. I think iTunes installs ok but Quicktime stops and gives me Error Code #2738. I have a new HP computer running Windows Vista. Can anyone give me a little help? Thanks

  • Incoming Payment with Reference to Invoice

    Hello All, I have created Customer Invoice via FB70. I have selected payment terms as 14 Day with 2% cash discount. I am now entering incoming payment via F-28 after 2 days, with reference to Original Invoice. Everything is going perfect. Now the pro

  • Mac OS X Server : cannot login

    I have a Mac OS X server 10.9.5. Since a recent update of the Server App, I have the following problems : - cannot login via imap and smtp to my server - cannot "connect as" my self in Finder any more to see my home directory on the server from an Im

  • First time data is not transported to pop up window through event handler

    Hi all, I am using NWDS 7.0, Now I want to open a pop up on click of a action link. There are two DCs DC-A and DC-B. I am calling action from DC-A to DC-B. DC-B contains view of pop up window. In DC-A I am using intreface controller of DC-B by using

  • Recording Vocals on a Track

    I am using the built in microphone and sometimes a usb mic to record my vocals. When I play it back my vocals and the music is coming up on the track which sounds awful. How do I get the music to stop playing in my vocals. Please help