Insert query in JDBC Reciever adapter!!!

Hi All,
We have an interface in which we are inserting data in Oracle server using JDBC Reciever Adapter.
The interface ends up in error on adapter engine level whenever the we are sending long data in one of the field of target structure. The error which we get in communication channel monitoring is that "String too long", on googling i found that in oracle they solve such problem by making the field data type as CLOB.
Thus can we define target structure field of CLOB type so that while inserting the data in Oracle server we never face the issue of this long string.
Thanks

>
Arpit Seth wrote:
> Hi All,
>
> We have an interface in which we are inserting data in Oracle server using JDBC Reciever Adapter.
> The interface ends up in error on adapter engine level whenever the we are sending long data in one of the field of target structure. The error which we get in communication channel monitoring is that "String too long", on googling i found that in oracle they solve such problem by making the field data type as CLOB.
>
> Thus can we define target structure field of CLOB type so that while inserting the data in Oracle server we never face the issue of this long string.
>
> Thanks
if the field contains very large data then yes, defining the target field in Oracle as a CLOB will solve your issue.
http://www.herongyang.com/jdbc/MySQL-CLOB-Overview.html

Similar Messages

  • Executing Select query using JDBC Receiver Adapter

    I created couple types in Oracle and also new function instead of procedure
    Can I execute the above query using JDBC Receiver Adapter.
    select *
    from  the ( select cast( apr.get_distribut('', '', '', 'hdfcgd', 'CAN') as dsrTable )
             from dual );
    If possible how my message structure should look like...

    Hi vikram,
       If you use JDBC as Receiver Adapter you can only post the data to the data base I do no think so we can select the records from the data base.
       If you use JDBC as Sender hope,we can the select query in the sender communication channel.
        Hope I am clear.
      Thanks and Regardds,
      Chandu.

  • Query in Insert statement with JDBC Rx adapter

    Hi,
    This is a FILE to JDBC scenario.
    My target datatype is like this with sample payload values
    statement_s
    statement_s
       action='INSERT"
      access
        A=1234
        B=1002
    key
       A=1234
       B ="10%"
         compareOperation= LIKE
    A(1..1) is primary key in DB and B(0..1) colunm is an optional one.
    I want to know if such kind of Insert query with(LIKE operator) is possible.
    Please reply me ASAP.
    Edited by: ram pranav on Feb 18, 2009 10:28 PM

    Hi Ram,
    IN case of "UPDATE_INSERT", you can use the KEY tag in your structure. Also you can provide LIKE as an attribute to the KEY element as follows :
    <key1>
         <col4 compareOperation=u201DLIKEu201D>val%</col4>
    </key1>
    But when you are trying to insert the data_, the <key> tags will be ignored and only <access> will be considered._
    action=UPDATE_INSERT
    The statement has the same format as for the UPDATE action. Initially, the same action is executed as for UPDATE. If no update to the database table can be made for this action (the condition does not apply to any table entry), values of the table described in the <access> element are inserted in accordance with the description of the action INSERT. <key> elements are ignored in this case.
    The response document has the following format; one of the two values is always 0 because either an UPDATE or an INSERT action is always executed:
    Go through the link I have provided earlier.
    Thanks,
    Pooja Pandey

  • Persistence under Exactly-Once Handling in JDBC Reciever Adapter

    Hi,
    Can any one explain me significance of persistance (Local or Database) in JDBC Receiver Adapter.
    Please provide me document if anyone has?
    Thanks,
    ABDUR

    hi,
    both types are described here with many details:
    http://help.sap.com/saphelp_nwpi71/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm
    under : Defining Exactly-Once Handling
    do you need anything more ?
    Regards,
    michal Krawczyk

  • Insert + Delete in JDBC Reciever/ SOAP Reciever..

    Hi,
    I have a requirement where I need to send date from SAP to multiple recivers ( DB+ Webservice).
    Now based on a field, it will be decided whether it is going to be FULL or Delta update.
    In case of
    1. Full: All the Db entries should be deleted and then the new records will be inserted.
    2. Delta: Only new records will be updated.
    Now I want to ask :
    1. How can I do this using Db ?
    I am aware I can use BPM or multiple MT in the mapping but I want to get detailed explaination about this plan.
    2. How can I do this with SOAP adapter.

    Hi. Why do you wanna use soap? you can do it with jdbc adapter.
    1)
    check:
                http://help.sap.com/saphelp_nw70/helpdata/en/4d/8c103e05df2e4b95cbcc68fed61705/content.htm
    you will have to create two statementName nodes, when for insert and one for delete actions.
    2)
    In case you have to send to multiple receivers based on source message you will have to use enhanced receiver determination. There you can create only one receiver determination, that will decide where to send message. Then you have to create several interface determinations, one for each receiver System.
    check:
                http://help.sap.com/saphelp_nw70/helpdata/en/43/a5f2066340332de10000000a11466f/frameset.htm
    There is much more info in sdn regarding this kind of requirement!
    Hope it helps
    Regards,
    Federico

  • Insert Query in JDBC

    How to write sql insert statement if the code is like this:
    String Str1 = "abhishek"
    String St21 = "Agrawal"
    stmt.executeUpdate("insert into my_table values( \"str1\",\"str2\")");
    this is not working
    help ME!!!!!

    first if ur using oracle just check the connection is proper or not just print below
    S.O.P(1); if it prints ur connection is successful. then dont use ur query write complete column name and then values ();
    write ResultSet rs=stmt.executeQuery();
    after tht take a while(rs.next())
    s.o.p.(rs,getint(1)) 1= columname or " ".
    con.close();
    Try this.

  • JDBC RECIEVER ADAPTER Configuration

    Hi,
    i'm doing one scenario.I'm sending sap data to Oracle 9i database.Pls give reciever jdbc structure.which structure i follws for oracle 9i.Pls this is urgent.Pls help me.
    Thanks
    Ravi

    Hi Ravi ,
    Please show us the input file format which you are trying to store in the Oracle DB.
    The format should look like any of these statement formats,
    <root>
      <StatementName1>
    <dbTableName action=u201DUPDATEu201D | u201CUPDATE_INSERTu201D>
        <table>realDbTableName</table>
    <access>
    <col1>val1</col1>
    <col2>val2new</col2>
    </access>
    <key1>
    <col2>val2old</col2>
    <col4>val4</col4>
    </key1>
    <key2>
    <col2>val2old2</col2>
    </key2>
    </dbTableName>
      </StatementName1>
      <StatementName2>
    <dbTableName action=u201DINSERTu201D>
    <table>realDbTableName</table>
    <access>
    <col1>val1</col1>
    <col2>val2</col2>
    </access>
    <access>
    <col1>val11</col1>
    </access>
    </dbTableName>
      </StatementName2>
      <StatementName3>
    <dbTableName action=u201DDELETEu201D>
    <key1>
    <col2>val2old</col2>
    <col4>val4</col4>    
    </key1>
    <key2>
    <col2>val2old2</col2>
    </key2>
    </dbTableName>
      </StatementName3>
      <StatementName4>
    <dbTableName action=u201DSELECTu201D>
        <table>realDbTableName</table>
    <access>
    <col1/>
    <col2/>
    <col3/>
    </access>
    <key1>
    <col2>val2old</col2>
    <col4>val4</col4>
    </key1>
    <key2>
    <col2>val2old2</col2>
    </key2>
    </dbTableName>
      </StatementName4>
      <StatementName5>
    <storedProcedureName action=u201D EXECUTEu201D>
        <table>realStoredProcedureeName</table>
    <param1 [isInput=u201Dtrueu201D] [isOutput=true] type=SQLDatatype>val1</param1>
    </storedProcedureName >
      </StatementName5>
      <StatementName6>
    <anyName action=u201D SQL_QUERYu201D | u201CSQL_DMLu201D>
    <access>SQL-String with optional placeholder(s)</access>
    <key>
      <placeholder1>value1</placeholder1>
      <placeholder2>value2<placeholder2>   
    </key>
    </anyName >
      </StatementName6>
    </root>
    Check this once and correct yourself.
    Or please give us the sample format which you are configuring.
    Urs,
    Soorya

  • Query in schedule task adapter using FilestreamProvider

    Hi,
    Requirement: I need to use a dynamic file send port which appends the file every 2 hours after which is picked up by an ftp adapter on a daily basis on a fixed time.For
    the above, I am using a scheduled task adapter to pick the from folder path(  send port path) and via FTP adapter send to the destination.
    Flowchart:
    Direct Binding in Orchestration->Map-> Dynaminc File Send port-> File should be appended every two hour(for eg: suppose the file has to be picked up every day at 1pm,3pm: Until 1pm, all the files appended in the folder should be picked and
    sent to the destination via schedule task adapter then the message should be deleted from the folder path then in between 1pm to 3pm how many every files come in should be appended aI have created a schedule task adapter using FileStreamProvider which should
    pick files from a folder path in the interval of 5mins. The file gets appended every 2 hours and is  sent to the destination. The adapter works fine but the file in the folder does not disappears after the schedule is over every 2 hours. Please provide
    a resolution. nd send to the destination via ftp adapter and the file should be deleted from the folder path)->Picked up by schedule task adapter every 1 hour-> sent to the destination via FTP send port.
    Problem:
    I have created a schedule task adapter using FileStreamProvider which should pick files from a folder path in the interval of 2 hours. The file gets appended every 2 hours and is  sent to the destination. The adapter sends the files at scheduled timee
    but the file in the folder(i.e where the file sits after being processed by dynamic send port) does not disappears after the schedule is over every 2 hours and the content of the file is also not visible. Any kind of help would be appreciated.
    Thanks in advance,
    Ranjana

    >
    Arpit Seth wrote:
    > Hi All,
    >
    > We have an interface in which we are inserting data in Oracle server using JDBC Reciever Adapter.
    > The interface ends up in error on adapter engine level whenever the we are sending long data in one of the field of target structure. The error which we get in communication channel monitoring is that "String too long", on googling i found that in oracle they solve such problem by making the field data type as CLOB.
    >
    > Thus can we define target structure field of CLOB type so that while inserting the data in Oracle server we never face the issue of this long string.
    >
    > Thanks
    if the field contains very large data then yes, defining the target field in Oracle as a CLOB will solve your issue.
    http://www.herongyang.com/jdbc/MySQL-CLOB-Overview.html

  • ERROR IN ORACLE STORED PROCEDURE in JDBC RECIEVER

    Hi all
    i have an FILE2JDBC2FILE sync scenario.have configured this w/o BPM.i need to call an stored procedure which will return me the output in the outpur parameters.input out put parametrs of the stored procedure are.
         p_api_version               IN  NUMBER
        ,p_init_msg_list             IN  NUMBER DEFAULT EBS_ECOM_UTILS_PUB.G_TRUE
        ,p_ebs_place_in_t     IN  p_ebs_place_in_t(sql TABLE TYPE )
        ,p_ebs_std_call_o     IN  ebs_std_call_oty(sql TABLE TYPE )
        ,x_return_status            OUT VARCHAR2
        ,x_msg_count                OUT NUMBER
        ,x_msg_data                 OUT ebs_message_tty
        ,x_row_count                OUT NUMBER
        ,x_ebs_place_out_t      OUT ebs_place_out_toty(sql TABLE TYPE );
    where
    p_ebs_place_in_t is of type p_ebs_place_in_t which has 2 fields MDM_SYSTEM_REF,EMAIL_ADDR and START_DATE
    p_ebs_std_call_o is of table type ebs_std_call_oty which has 2 fields WORK_GRP_ID and  DEBUG_MODE 
    In XI i am passing the arguments in the following fashion to ORACLE (JDBC reciever adapter)
    <p_api_version isInput="true" type="integer">1</p_api_version>
    <p_init_msg_list isInput="true" type="integer">1</p_init_msg_list>
    <p_ebs_place_in_t isInput="true" type="CHAR">
    <MDM_SYSTEM_REF isInput="true" type="CHAR">MDM-237</MDM_SYSTEM_REF>( this is a field in p_ebs_place_in_t )
    <EMAIL_ADDR isInput="true" type="CHAR"></EMAIL_ADDR>>(this is a field in p_ebs_place_in_t )
    <START_DATE isInput="true" type="date"/>06-OCT-2009 00:00:00</START_DATE>>(this is a field in p_ebs_place_in_t )
    </p_ebs_place_in_t>
    <p_ebs_std_call_o isInput="true" type="CHAR">
    <WORK_GRP_ID isInput="true" type="integer">95714</WORK_GRP_ID>
    <DEBUG_MODE isInput="true" type="integer">5</DEBUG_MODE>
    </p_ebs_std_call_o>
    <x_return_status isOutput="true" type="CHAR"></x_return_status>
    <x_msg_count isOutput="true" type="integer"></x_msg_count>
    <x_msg_data isOutput="true" type="CHAR"></x_msg_data>
    <x_row_count isOutput="true" type="integer"></x_row_count>
    <x_ebs_place_out_t isOutput="true" type="CHAR">
    </x_ebs_place_out_t>
    i am gettng the below error when i am trying to post th message from RWB
    Error when executing statement for table/stored proc. 'APPS.EBS_CUSTOMER_SERVICE_PUB.MAINTAIN_PLACE' (structure 'StatementName1'): java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'MAINTAIN_PLACE' ORA-06550: line 1, column 7: PL/SQL: Statement ignored .
    please suggest..
    Edited by: Rohan Patil on Jun 13, 2010 12:55 AM

    HI Praveen,
    thanks for your reply.
    my stored procedure has input and output parameters both.
    and in XI i have created the data type for both isInput(passedwith all the required values) and isOutput(passed the null values)
    is this  correct..?or should i take only isInput parameters in the data type?
    do i need to take the isOutput also in the datatype?my stored procedure will return the output in the output parametrs.
    can i take only 1 or 2 output paraetrs as there are 4 to 5 output parameters for my sotred procedure.?
    and how will my response data type to send the output of the stored procedure to the FILE sustem.should it be also in the statement form?
    and also would like to know..some of my isInput parameters to the stored procedure has the table type structure as the input parameters.now my question is i should i declare them in my data type?
    can you please elaborate.

  • JDBC Receiver: Check INSERT Query.

    Hi Experts,
    I am working on IDOC To JDBC(INSERT) Scenario.
    Is there any possibility to check the INSERT Query that triggered by Receiver Adapter? If its possible please guide me how .
    Thanks,
    Vijay.

    Hi Vijay,
    Configure parameter logSQLStatement = true in advanced parameter of JDBC receiver channel. It will show the INSER query in audit log of message which you can see from message monitoring of RWB.
    Regards
    Sushil

  • In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String

    In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String , for executing the Stored Procedure with Current date as the input .

    Hi Srinath,
    The below blog might be useful
    http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/03/06/executing-stored-procedure-from-sender-adapter-in-sap-pi-71
    PI/XI: Sender JDBC adapter for Oracle stored procedures in 5 days
    regards,
    Harish

  • JDBC receiver adapter for AS400-query time out due to Escape Symbol

    Hello,
    I am uisng JDBC receiver adapter for AS 400, When I execute query, the query needs to have arguments in the open and close single ticks ('    12345' )
    My XML pay load looks like this, which is RFC sender. Look at dcudcstmr in <i><b>(' 838912')</b></i>.  When receiver gets this message the ' (single quotes are disappeared.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns1:MT_Cma_Customer_Select_Request xmlns:ns1="http://freemanco.com/xi/Get_Customer">
    - <Statement>
    - <LawsonCustomer action="SQL_QUERY">
      <access>select f1.DACMCMPNY from sap.sapcustvew f1, sap.sapcustvew f2 where f2.dcudcstmr in <i><b>(' 838912')</b></i> and (f1.dcudcstmr=f2.dcudcstmr or f2.komaster=f1.dcudcstmr)</access>
      </LawsonCustomer>
      </Statement>
      </ns1:MT_Cma_Customer_Select_Request>
    On the Receiver JDBC adapter I have tried with different combinations of Escape Symbol for Aposrophe as follows
    <b>   \
       '</b>
    As you know this is related to epcape character, I get following error all the time. Looks like the query is not able to execute in the specified time. My question is how do I get single quote as part of query.
    <b>select f1.DACMCMPNY from sap.sapcustvew f1, sap.sapcustvew f2 where f2.dcudcstmr in ( 100001) and (f1.dcudcstmr=f2.dcudcstmr or f2.komaster=f1.dcudcstmr) 2007-09-20 15:56:42 Error Unable to execute statement for table or stored procedure. 'LawsonCustomer' (Structure 'Statement') due to java.sql.SQLException:
    [SQL0666] Estimated query processing time 13766 exceeds limit 8000. 2007-09-20 15:56:42 Error MP: exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'LawsonCustomer' (structure 'Statement'): java.sql.SQLException:
    [SQL0666] Estimated query processing time 13766 exceeds limit 8000. 2007-09-20 15:56:42 Error Exception caught by adapter framework: Error processing request in sax parser: Error when executing statement for table/stored proc. 'LawsonCustomer' (structure 'Statement'): java.sql.SQLException:
    [SQL0666] Estimated query processing time 13766 exceeds limit 8000. 2007-09-20 15:56:42 Error Delivery of the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'LawsonCustomer' (structure 'Statement'): java.sql.SQLException:
    [SQL0666] Estimated query processing time 13766 exceeds limit 8000.. Setting message to status failed. 2007-09-20 15:56:42 Error The message status set to FAIL. 2007-09-20 15:56:42 Error Returning synchronous error message to calling application: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'LawsonCustomer' (structure 'Statement'): java.sql.SQLException:
    [SQL0666] Estimated query processing time 13766 exceeds limit 8000</b>
    Any feedback or helpfull tips appreciated.
    Thank you,
    Balaji

    Raj,
    Thank you for the reponse. I am using UDF on sender to generate sql statement as you see in sender XML message. After the message reaching receiver, gets executed but no response from AS400 becasue of missing single quotes in the sql query executed.
    Sender XML sends
    <access>select f1.DACMCMPNY from sap.sapcustvew f1, sap.sapcustvew f2 where f2.dcudcstmr in <u><b>(' 838912')</b></u> and (f1.dcudcstmr=f2.dcudcstmr or f2.komaster=f1.dcudcstmr)</access>
    Receiver executes as
    select f1.DACMCMPNY from sap.sapcustvew f1, sap.sapcustvew f2 where f2.dcudcstmr in ( <b><u>838912</u></b>) and (f1.dcudcstmr=f2.dcudcstmr or f2.komaster=f1.dcudcstmr)
    As you see the single quotes are missing. Like I said in previous posting I tried with following Escape Symbol for Aposrophe.
    Let me know if you need more information.
    Thank you,
    Balaji

  • JDBC Sender Adapter - Transaction & Parameterized Query?

    Dear Experts,
    I'm curious about the JDBC sender adapter in SAP PI.
    As I see from the document and have been searching in the Internet, The default procedure of the sender JDBC adapter is to first run a SELECT/Store Procedure query then update the records that have been read before.
    Configuring the Sender JDBC Adapter - Advanced Adapter Engine - SAP Library
    What I want to ask is:
    - What is the database transaction used for the SELECT and the UPDATE? I mean what if the SELECT is successful and the records have been sent to the IE, but the UPDATE failed. This way, the next polling run, the same records could be read again. Is it possible? Are the SELECT and UPDATE query atomic (if one fails the other fails too)?
    - Is it possible to have a parameterized query / stored procedure in sender JDBC adapter? Because seeing at the default procedure, there should be at least a field that will be used as a flag (for example the processed field needs to be updated to '1'). Something like:
              - SELECT * FROM table_a WHERE docno > $last_doc_no
                             $last_doc_no is a paramter or variable from PI
              - EXEC sp_do_something ( $param_a, $param_b )
                             $param_a, $param_b are parameters or variable in PI
    Thank you,
    Suwandi C.

    Hi Suwandi,
    all action to database are in one transaction and thats mean if one failed all failed.
    And it is possible to have parameterized storied procedure. You sould send something like
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:mt_proc xmlns:ns0="http://aaaa">
       <statementname>
          <stProc action="EXECUTE"/>
          <TABLE>PROCEDURE NAME</TABLE>
          <access>
             <param_in isInput="1" type="some_type">input param</param_in>
             <param_out isOutput="1" type="some_type"></param_out>
          </access>
       </statementname>
    </ns0:mt_proc>

  • JDBC Sender adapter - can VIEW be used in Query statement

    Hi,
    In JDBC Sender adapter, can we use a VIEW sql query in the "Query SQL Statement" placeholder?
    For eg:
    CREATE VIEW <view name> as SELECT * from <table name> WHERE <condition>
    instead of the usual:
    SELECT * from <table name> WHERE <condition>
    Thanks,
    Vishak

    Hi
    What exactly is your use of creating a view, if you are going to fetch data from different tables, then you can use the view through stored procedures.
    Hope this clears your doubts
    Thanks
    Saiyog

  • JDBC receiver adapter: Insert of CLOB into Oracle DB

    Hi,
    I've got a short question:
    Is it possible to insert CLOB fields (larger than 4kB) into an Orcale database using the JDBC receiver adapter without using a stored procedure?
    We are on XI 3.0 SP20.
    I had someting in mind that this is only possible with a stored procedure but I am not sure on this.
    Thanks and Regards,
    Helmut

    HI,
    Is it possible to insert CLOB fields (larger than 4kB) into an Orcale database using the JDBC receiver adapter without using a stored procedure?
       yes, you can do it but it is not a best practise, but using Stored Procedure is .
    Regards,
    karna...

Maybe you are looking for

  • Adding Sound FX...???

    Is there a way to add sounds NOT LOOPS but sound effects like for me, I have some WHOOSH sounds I would like to incorporate into a song. I am not sure how to go about importing that file into ST then using it in a song.

  • Is there any way of getting back from a wrong clicked free trial to add my serial number correctly?

    Hi On purchasing a new imac I copied the apps across & on opening CS6 was requested to load serial numbers, through tiredness I added the seria; number from CS5.5 and therefore not recognised for the CS6, then when about to enter again through tiredn

  • Self-assigned IP address issue after upgrade

    I do a lot of file transferring from my mac to another pc laptop, so I've got them hooked together with an ethernet cable.  I had this issue in the past, where I'd try to connect but my network settings kept saying the "ethernet has a self-assigned I

  • Tecra M2 - I need a new HDD that is compatible

    Hi, I've just bought a 2nd hand Tecra M2, but the hard drive will need replacing shortly since it's on the way out. I've found a hard drive on ebay which says it's compatible, it says in the heading for the hard drive "Toshiba 120GB Laptop Hard Drive

  • A communication problem (sort of) between classes

    Hi, Why, oh why, doesn't this work: When I select a row in my tableClass (consist of a JTable) I want to display these values (strings) in my TextFieldGUI class (consist of just JTextFields). My code looks like this: TableClass: public void mouseClic