Insert XML content  from BLS to oracle table

Hi,
Is there any way to send XML content from BLS to Oracle table. I tried with FixedQueryWithOuput. It works, but it has limitation, it cannot take more than 4000 character , even though the param is configured as clob in oracle database side?

Sajjad
This is not issue from xMII-side itself, instead this is an Oracle issue itself. This has some limitation in manipulating data in Database.
Managing CLOBs and BLOBs in JDBC is not very simple when compared to managing small amount of data. The way the CLOB and the BLOB objects are created and managed is different than a VARCHAR(String) column. In fact, Oracle extension classes are provided to support these types objects in JDBC like oracle.sql.CLOB, oracle.sql.BLOB etc.
The new enhancements in Oracle JDBC 10g promises to simplify the insertion and retrieval techniques for the CLOBs using the standard APIs. This document enumerates how easily the CLOB data can be handled in JDBC, by harnessing the new features of the Oracle JDBC 10g driver
Anyway, to more get info on Oracle problems u may read  <a href="http://www.oracle.com/technology/sample_code/tech/java/codesnippet/jdbc/clob10g/handlingclobsinoraclejdbc10g.html">this</a>
Regards
Som

Similar Messages

  • Inserting XML content into Database

    Hallo
    i´m new to Oracle.
    i want to insert xml content into the database. for testing i installed the version 10g on a windowsxp computer.
    i read the oracle xmldb developer´s guide. on page 3-4 ff. it is explained how i can insert content into the database. that´s how i did it (with isqlplus):
    create table example1(key_column varchar2(10) primary key, xml_column xmltype)
    -->works fine
    create table example2 of xmltype
    -->works fine
    now i made a directory under c:\myXmlFilesForDb in WinXp
    create directory xmldir as 'c:/myXmlFilesForDb in WinXp'
    (also tried: create directory xmldir as 'c:\myXmlFilesForDb in WinXp')
    --> in this directory is a file named: mydokument.xml
    --> works fine
    insert into example2 values(xmltype(bfilename('xmldir','mydokument.xml'), nls_charset_id('AL32UTF8')))
    the following error message is displayed (in German):
    ORA-22285: Verzeichnis oder Datei für FILEOPEN-Vorgang nicht vorhanden
    ORA-06512: in "SYS.DBMS_LOB",Zeile 523
    ORA-06512: in "SYS:XMLTYPE",Zeile 287
    ORA-06512: in Zeile 1
    whats wrong? can anybody help me please?
    ohhh....
    thank you very much
    cu
    George

    Directory entries are case sensitive.
    Select * From dba_directories to ensure you case is the same as you are using in your insert statement.
    Are you using the same user? if not grant read on directory directoryname to username;
    try to just select.
    select dbms_lob.getLength(BFileName('directoryname','filename.xml'))
    as length
    from dual;

  • Upload data from excel to oracle table

    Hi,
    if i'm user and using an application and i want to upload data from excel to oracle table on button click . Is it possible by using sql loader.
    If yes then please clarify it .
    is it possible from client end.
    thanks
    kam

    Yes it is possible using SQL*LDR, External tables and ORCL Export Utility. Though I didn't try Export Utility to load the external files.
    SQLLdr sysntax:
    Create a control file.
    It looks like this
    Load data
    Infile 'source.dat' 
    Into Table tablename
    Fields terminated by ',' optionally enclosed by '"'
    {code}
    then use sqlldr command from your OS.
    {code}
    sqlldr userid/password@sid control = filename.ctl, data = source.dat, log = logname.log, bad = badname.log, discard = discardname.discard
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Access XML Content from Alert Category (ALRTCATDEF) ?

    Hi PI Expert,
    is that possible to access xml content from Alert Category (ALRTCATDEF) if the error occurs from Adapter engine.
    For example IDOC number / PO Number, so i can put in into Subject email notification.
    At the moment i am only know how to send dynamic data from ccBPM.
    Please advise.
    Thank You and Best Regards
    Fernand.

    Hai,
    Yes the user existed in QA before I transported the category. (Since users are not transported, I simply created a user with the same name.) Also, I used the role SAP_XI_ADMINISTRATOR for the receivers via subscription and roles.
    Thanks,
    Filipe

  • How to delete contents from more than 1 table

    How to delete the entire contents from more than 1 table in a single query.
    It is very urgent,
    Thanks in advance
    John

    Goto SE11 ->Open table ->Utility ->data base utility ->delete database table.
    BTW, Do not do it.
    Thanks,
    Ashish

  • Loading Metadata from planning to oracle table

    Hi
    I am trying to load one dimension metadata from planning to oracle table.we are on 10.1.3
    i selected LKM SQL to SQL to load from source to staging area and IKM SQL to SQL append to load from staging to Target.
    I got the below error
    0 : null : java.sql.SQLException: Driver must be specified
    java.sql.SQLException: Driver must be specified
         at com.sunopsis.sql.SnpsConnection.a(SnpsConnection.java)
         at com.sunopsis.sql.SnpsConnection.t(SnpsConnection.java)
         at com.sunopsis.sql.SnpsConnection.connect(SnpsConnection.java)
         at com.sunopsis.sql.SnpsQuery.updateExecStatement(SnpsQuery.java)
         at com.sunopsis.sql.SnpsQuery.executeQuery(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.h.y(h.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    Please suggest..
    Thanks,

    Hi John
    Thank you for the response
    i am trying to load accounts back to oracle table.
    My plan is to load existing accounts in planning to a oracle table i.e PLANACNT,so when i load new accounts from oracle to planning through ODI , i can say in the source filter that load Table.column not in (select accounts from PLANACNT).
    Please suggest if there is any better method for this...my plan is to load new accounts created in oracle to planning by comparing the accounts in planning.
    Thanks,

  • Parse XML Elements/Attributes from CLOB into Oracle Table

    Hi!
    I have an XML file (loaded into a CLOB) which I need to parse and have each individual element and attribute inserted into an oracle table for manipulation.
    Eg: XML File...
    <PERSON>
    <PER_ID changed="1">1</PER_ID>
    <SURNAME changed="1">MARTIN</SURNAME>
    <ADDRESS>
    <STREET_NO changed="1">1</STREET_NO>
    <POSTCODE changed="1">LE3 8RA</POSTCODE>
    </ADDRESS>
    </PERSON>
    There will only ever be one address.
    From this I need to extract
    * PER_ID and related changed attribute
    * SURNAME and related changed attribute
    * STREET_NO and related changed attribute
    * POSTCODE and related changed attribute
    and insert a single record into the table below:
    CREATE TABLE PERSON AS
    ( PER_ID VARCHAR2(10)
    , ID_CHANGED VARCHAR2(1)
    , SURNAME VARCHAR2(30)
    , ID_CHANGED VARCHAR2(1)
    , STREET_NO VARCHAR2(5)
    , ID_CHANGED VARCHAR2(1)
    , POSTCODE VARCHAR2(10) );
    Any assistance/advice would be very much appreciated. I've tried using DBMS_XMLSave / DBMS_XMLStore which works great at pulling in elements (PER_ID, SURNAME, etc) straight into the table but doesn't look at the changed attributes, and I need both.
    Thanks a million in advance to anyone who can crack this!!
    Jay

    Try looking at this thread
    Loading datafrom a PL/SQL table into the Database table

  • Want to load an xml document directly into an Oracle table

    From the Oracle XML Applications book pg: 106/107
    there is an example where it inserts into a Oracle table from the xml_documents table. What I would like to do is insert directly from the xml document and was able to but not able to get rid of the inserting into xml_documents section.
    CREATE OR REPLACE PROCEDURE insertXmlFile( dir VARCHAR2,
    file VARCHAR2,
    myTable varchar2,
    name VARCHAR2 := NULL) IS
    theBFile BFILE;
    theCLob CLOB;
    theDocName VARCHAR2(200) := NVL(name,file);
    BEGIN
    -- (1) Insert a new row into xml_documents with an empty CLOB, and
    -- (2) Retrieve the empty CLOB into a variable with RETURNING..INTO
    INSERT INTO xml_documents(XML_DOCUMENT_NM,XML_DOCUMENT_TX)
    VALUES('DELETE ME',empty_clob())
    RETURNING XML_DOCUMENT_TX INTO theCLob;
    -- (3) Get a BFile handle to the external file
    theBFile := BFileName(dir,file);
    -- (4) Open the file
    dbms_lob.fileOpen(theBFile);
    -- (5) Copy the contents of the BFile into the empty CLOB
    dbms_lob.loadFromFile(dest_lob => theCLob,
    src_lob => theBFile,
    amount => dbms_lob.getLength(theBFile));
    -- (5a) Insert the rows into the proper table
    insProc(theClob, myTable);
    -- (6) Close the file and commit
    dbms_lob.fileClose(theBFile);
    delete from xml_documents
    where xml_document_nm = 'DELETE ME';
    COMMIT;
    END;
    execute insertXmlFile ('XMLFILES','emp.xml','emp')

    Yes I would like to insert directly from an emp.xml file and load it directly into an emp table and not have to load the document in the xml_documents table and then insert into the emp table like I am doing in this procedure.

  • Xml content in CLOB in Oracle 8i

    Not sure if this is the right forum. If not, please let me know where I can post this query.
    We are using Oracle 8i. We have to store the content of an xml file in a CLOB field in the database. Here is the code we are using to insert xml in the CLOB:
    CREATE OR REPLACE PROCEDURE test( dir VARCHAR2,
    file1 VARCHAR2,
    name VARCHAR2 := NULL) IS
    theBFile BFILE;
    theCLob CLOB;
    theDocName VARCHAR2(200) := NVL(name,file1);
    BEGIN
    -- (1) Insert a new row into xml_documents with an empty CLOB, and
    -- (2) Retrieve the empty CLOB into a variable with RETURNING..INTO
    INSERT INTO xml_documents(docname,xmldoc) VALUES(theDocName,empty_clob())
    RETURN xmldoc INTO theCLob;
    -- (3) Get a BFile handle to the external file
    theBFile := BFileName(dir,file1);
    -- (4) Open the file
    dbms_lob.fileOpen(theBFile);
    -- (5) Copy the contents of the BFile into the empty CLOB
    dbms_lob.loadFromFile(dest_lob => theCLob,
    src_lob => theBFile,
    amount => dbms_lob.getLength(theBFile));
    -- (6) Close the file and commit
    dbms_lob.fileClose(theBFile);
    COMMIT;
    END;
    The data appears to be inserted but is corrupted. When we query the table, the field value has junk chars like inverted question marks. What could be wrong? Could it be settings on the server or are we missing something?
    Please let us know. Thanks in advance.
    regards,
    Kameshwari.

    Unfortenately this forum is related to XML DB, which is the marketing namefor the native XML capabilities that were instroduced in database 9.2.x. You could try either the General database forum
    General Database Discussions
    or the General XML forums
    General XML

  • How can I inserting file's line into a oracle table in physycal order

    How can I insert the file's line into a oracle table in the same physycal order that they exists in the file ?
    I am using "SQL to FILE" km to performing file load into Oracle table, but the order which the records are insered into the oracle table doesn't match with the order of file's lines
    How can I guarantee the same file's physycal order in the oracle table( target ) and file( source ) ?
    Is it possible throught ODI ?
    Thanks,
    Luciana

    Hi,
    although I understand why use "File to Oracle( SQLLDR )" KM, I haven't the guarantee that in the agent's machine the Oracle Client installed and because when I openned the others projects I saw that anyone in my company use this KM( "File to Oracle( SQLLDR )" )
    Tha's why I ask for anyone lead me whith the modification of the previous post in the "uLKM File to SQL", specifing the km step e where put the RECNUM pseudo column
    This is fundamental for my ODI project
    When I try to alter the "Create Work Table" and "Load Data" step of my "uLKM File to SQL" km, the execution returned me the error below:
    =====================> Create Work Table Step
    create table <@= vWorkTable @>
         C1_LINHA_ARQ     VARCHAR2(500) NULL, RECNUM NUMBER(10)
    =====================> Load Data Step
    select     LINHA_ARQ     C1_LINHA_ARQ
    from      TABLE
    /*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=ARQ_INSS2SNP$CRLOAD_FILE=/arquivos_odi/ccrs/in/#CCRS_CAD_INSS.vpNOME_ARQUIVOSNP$CRFILE_FORMAT=DSNP$CRFILE_SEP_FIELD=09SNP$CRFILE_SEP_LINE=0D0ASNP$CRFILE_FIRST_ROW=0SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=LINHA_ARQSNP$CRTYPE_NAME=STRINGSNP$CRORDER=1SNP$CRLINE_OFFSET=1SNP$CRLENGTH=500SNP$CRPRECISION=500SNP$CR$$SNPS_END_KEY*/
    insert into ODI_RUN_CONV.C$_0TMP_ODI_INSS_DADOS_ARQ
         C1_LINHA_ARQ, RECNUM
    values
         :C1_LINHA_ARQ, RECNUM
    =====================
    984 : 42000 : java.sql.BatchUpdateException: ORA-00984: column not allowed here
    984 : 42000 : java.sql.SQLSyntaxErrorException: ORA-00984: column not allowed here
    java.sql.BatchUpdateException: ORA-00984: column not allowed here
         at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:629)
         at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:9409)
         at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:211)
         at com.sunopsis.sql.SnpsQuery.executeBatch(Unknown Source)
    ...Thanks again gyus,
    Luciana
    Edited by: 933810 on 31/05/2012 06:04
    Edited by: 933810 on 31/05/2012 06:07
    Edited by: 933810 on 31/05/2012 06:14

  • How to remove actual XML content from Weather Web Service Client's standard output?

    Hi,
    I tried web service example examples.webservices.rpc.weatherEJB.Weather with WLS6.1,
    it works fine, but on client side, ( either Client or DClient ), I always see
    the actual XML content being sent and received from standard output, like
    "------------- RECEIVING XML -------------", and I can't find any related System.out.println
    statement in client source code, Please explain how to remove it, may there is
    a configurable parameter for this? any help will be highly appreciated.
    Thanks
    Naichen

    Hi Naichen,
    To suppress showing the actual SOAP request and response going to standard out,
    change the following line in the Client.java:
    h.put("weblogic.soap.verbose", "true" );
    to read:
    h.put("weblogic.soap.verbose", "false" );
    Regards,
    Mike Wooten
    "Naichen Liu" <[email protected]> wrote:
    >
    Hi,
    I tried web service example examples.webservices.rpc.weatherEJB.Weather
    with WLS6.1,
    it works fine, but on client side, ( either Client or DClient ), I always
    see
    the actual XML content being sent and received from standard output,
    like
    "------------- RECEIVING XML -------------", and I can't find any related
    System.out.println
    statement in client source code, Please explain how to remove it, may
    there is
    a configurable parameter for this? any help will be highly appreciated.
    Thanks
    Naichen

  • Repeating XML content from db and linked images

    I'm using XML to flow content from a database into an ID CS2 pub. There will be an .ai file associated with each record which will be placed into a tagged inline frame in each repeating element. I would like to store the .ai files in their own directory and have a field in the database that references the path to each specific file for each particular record.
    So...do I simply need to put a placeholder image in the layout and tag the path to the link with the same name as the db field referencing the image path? How do I tag the path to the linked image?
    On a related note, I would also to include a symbol with certain records (there's a field in the db that's a "yes-no" checkbox--if this box is checked for any record, I would like the symbol to appear on the page with that record).
    Hope I'm being clear here.
    Thanks for the help.

    Hello bshannon,
    Thanks for your answer, I tried your suggestion but when I use URLDataSource I get the error message http 500 (in my original post I said that using URLDataSource the mail was sent but without the image... my mistake, I was getting this same error). I traced the error and I found that it is caused by a null pointer exception... let me explain
    This is the code for the jsp that returns the image:
    4        <jsp:useBean id="coverImage" class="com.mqm.struts.getImageAction" scope="session" />
    5       <%
    6           // Desired size of the image to return
    7           int heigth = Integer.parseInt(request.getParameter("heigth"));
    8          int width = Integer.parseInt(request.getParameter("width"));
    9          
    10          // Each item can have up to 6 images (ordered by id), this indicates wich of one we have to return
    11            int imageIndex = Integer.parseInt(request.getParameter("imageIndex"));
    12        byte[] imgData = coverImage.getItemImageAction(request.getParameter("itemId"), request,heigth, width, imageIndex );
    13        response.setContentType("image/jpeg");
    14        OutputStream o = response.getOutputStream();
    15         o.write(imgData);
    16         o.flush();
    17         out.clearBuffer();
    18         o.close();
            %> getImageAction is my DAO class that actually reads the image data from the DB, when I use this 'getImage.jsp' inside any other jsp in the app it works, but when used as described in the first post the request parameter in the line 12 doesn't have the session info, apparently creates a new session or something and since I use information in the session to create the DAO factory I can't connect to the DB and get this error..
    pls tell me if I explained my self or I'm just talking non sense
    regards

  • Retrieving content from JavaScript created web tables?

    I am developing a simple Java program that is to browse a particular site, follow links and download web page content (which is created dynamically based on day and sports selected) from which data enclosed in <table>....</table> tags is later parsed and used in Excel spreadsheet for later analysis.
    The idea is to collect sports betting odds from Internet sportsbooks and of course such content is created dynamically based on day's offer of sports events!
    It can be done when the web tables are created dynamically with ASP or PHP as it basically just feed you the web page with all the data still enclosed in standard HTML tables tags.
    However there are quite a number of sites that use Javascript to create such dynamic tables. SO MY QUESTION IS: IS THERE A WAY TO GATHER SUCH JAVASCRIP CREATED WEB DATA IN JAVA?
    Thanks in advance!

    One more thing occured to me as a possible solution but I don't know if it can be done?
    Those particular JavaScript generated web pages that I'm trying to retrieve contents from display data in html tables created depending on the user input!
    Appart from zillion fancy design functions, those pages create a loooooong string which basically represents html <table>.....</table> structure and all the rows and cells are constructed by calling multiple JavaScript functions and filling those tables with variables contained in arrays located in several *.js files.
    So my idea is, CAN YOU CATCH THAT FINAL GENERATED HTML, that is used to view the web page in a browser?

  • " (quotes) is column values when loading data from csv to oracle table

    I am loading a data from csv file to an oracle table.
    After the data is loaded , lets suppose the value in one column is X.
    when i write a query to fetch data like
    select * from table where col='X' then it gives no output.
    On investigating it was found that the value is stored in col as "X".
    This also happens when i copy paste the value from column to some text editor ....
    i want to remove these double quotes , and also want to know why these are coming...
    Any suggestions guys ?
    Thanks
    Using Oracle 10g

    These quotes are part of your data file. Most CSV-parsers remove those quotes.
    If you are using an external table you can remove them by something like this for your access parameters
    ORGANIZATION EXTERNAL
      TYPE ORACLE_LOADER
      ACCESS PARAMETERS
        RECORDS DELIMITED BY NEWLINE
        FIELDS TERMINATED BY ','
        OPTIONALLY ENCLOSED BY '"'
    But if you want to remove them from your existing data use this
    update your_table
      set col1 = trim( '"' from col1 )
    Note that in some CSV-files wich use an enclosing character the enclosing character is itself is used as an escape character to use the enclosing character inside a field.
    For example a field might be "Some text with ""this"" enclosed"
    To correct these fields you might use another update
    update your_table
      set col1 = replace( col1, '""', '"' )

  • How to read XML content from IPortalComponentRequest and parse them

    Hi ,
    I have a portal application.The application has 2 components(Comp1,comp2).
    Comp1 is JspDynpage and Comp2 is AbstractPortalComponent.
    Comp1- has a iframe element which point to the external url and has a parameter return_url.
    retrun_url has a value as url to Comp2(http://ibm0343:50000/irj/servlet/prt/portal/prtroot/NewUrlProj.NewUrlComp)
    When an event occurs in the external site,i suppose to receive XML content in return_url(ie Comp2),how can i check using the request if the received content is XML and how do i parse them.
    I have already seen blogs from Prakash singh in which it refers a xml fixed location in webserver.

    Hi Detlev,
    i am reposting this once again as the previous
    reply didnt align good.
    Thanks for your reply.The scenario is that
    My portal application has to communicate with external GIS(Graphical information system)
    service provider client application.
    They say that i have to use iframe in my portal application.
    Here is the snipet of the iframe tags.
    <iframe
    id="Nedbrowser"
    name="Nedbrowser"
    width="100%"
    height="100%"
    frameborder="no"
    marginheight="0"
    marginwidth="0"
    scrolling="no"
    style="position:absolute; top:0; left:0; width:800; height:400; z-index:100; visibility:visible"
    src="http://nbg.nedg.nl/nbgint/NBG_INT_main.asp?action=CHART&datasource=NBGMV&product=INTERNET&size_x=300&size_y=300&result_frame=Results&
    result_url=http://ibm0343:50000/irj/servlet/prt/portal/prtroot/NewUrlProj.NewUrlComp&
    default_centre_x=256000&default_centre_y=471000&default_width=0.5">
    </iframe>
    <iframe
    id="Results"
    name="Results"
    width="100%"
    height="100%"
    frameborder="no"
    marginheight="0"
    marginwidth="0"
    scrolling="no"
    style="position:absolute; top:400; left:0; width:800; height:200; z-index:100; visibility:visible"
    src="about:blank">
    </iframe>
    When my portal application is started, comes the GIS map in the iframe with in my portal application.
    When the user clicks in the area of the map,Gis application returns xml data to the return_url.
    The reurn_url is my PortalAbstractComponent in which i have to parse the xml and use it for further processing in R3 system.

Maybe you are looking for