Batch mode on JDBC adapter

Hello XI Experts
Could anyone please provide more information about how to use the Batch mode in JDBC adapter.  I would be sending about 200,000 records from abap proxy to oracle. Is it better to adopt the batch mode approach or the splitting of data in chunks approach so as to have a better performance while sending huge volumes of data.

Hi ,
Batch mode will be used to execute group of SQL statements at a time and it will improve the performance.
but in your case sending 2lac records at a time will def create problems,my suggestion is split the data in to small chunks and send to data base,it will not create any problems.
if you want split the data use java mapping , using that we can easily split the number of records in to small chunks.
write a log in java mapping split the data in to 10000 records every time, out put stream will return multiple records,suppose you have 200000 records,if you are trying to split the data in to 10000 records,java OUTPUT stream will return 20 messages
this is my idea,,if you find any other best way to split data,follow that.
Regards,
Raj

Similar Messages

  • Date/Time Format Stored Procedure Calls in ADVANCE MODE in JDBC ADAPTER

    Hi Experts,
    What is significance of Date/Time Format Stored Procedure Calls in ADVANCE MODE in JDBC ADAPTER.
    Thanks,
    ABDUR

    I guess this would be applicable for the folowing formats - DATE, TIME, TIMESTAMP.
    This is the correct link
    http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm
    Regards,
    Prateek

  • Difference between maximum concurrency and batch mode in JDBC

    Hi All,
             Could som one tell me the difference between maximum concurrency and batch mode in receiver JDBC adapter?
    Regards,
    XIer

    Hi,
    The Max Concurrancy and Batch mode are used for performance tunning for JDBC adapter.
    Max Concurrancy is possible upto 5 only. so even if you will be taking up 10 it will by-default take 5.
    The number of records being processed depend on the size of each record. for e.g Per minit XI Is Processing 50 Records,It will Take lot of time to process all Records.
    So if you set Max concurrancy as 5 then at time 5 messages will be processed simultaneously.
    In Batch mode it will, collect the multiple SQL statements that will be created for records to be processed and processed at a time. It will  improve performance considerably.
    But Batch Mode is possible with only INSERT, UPDATE, DELETE etc.
    The Stored procedures can be executed with max concurrency
    Thus it completely depends that on the no of records to be processed at a time and volume of Mesasges.
    Thanks
    Swarup

  • XML SQL format for Prepared statements in batch mode

    Hi
    I want to use the batch mode in JDBC adapter for inserting huge volume of records with better performance.
    so i need to execute the prepared statements in one batch.   Is the XML SQL format for prepared statements below correct ?to<root>
      <stmt>
        <Customers action="SQL_DML">
          <access> INSERT INTO Customers (CompanyName,Address,CustomerID) VALUES($NAME$,$ADDRESS$,$KEYFIELD$)
          </access>
          <key>
            <NAME>IBM</NAME>
            <ADDRESS>Street 3 </ADDRESS>
            <KEYFIELD>CO</KEYFIELD>
          </key>
          <key>
            <NAME>PWC</NAME>
            <ADDRESS>Street 4 </ADDRESS>
            <KEYFIELD>NO</KEYFIELD>
         </key>
        </Customers>
      </stmt>
    </root>
    Please advise

    Hello Experts
    Please throw some light on the above question.
    Thanks in advance.

  • Howto Scenario: Inbound IDOC - 2 rows into JDBC adapter ?

    Hi,
    How can I achieve the following:
    Inbound IDOC into XI, has to be transformed, and 2 rows have to be inserted into a database table.
    I am able to insert 1 row through the XMB2DB_XML mode in JDBC adapter. 
    A solution could be to create an identical XML structure ("access" elements) through mapping, but I am unable to get 2 XML structures from 1 inbound IDOC document.
    Any ideas are most welcome.
    thanks,
    Manish

    Hi Manish,
    On the target side, right-click on the "access" element and select "Duplicate Subtree".  Now, you should have 2 "access" structures to map from the IDoc.
    Regards,
    Bill

  • What are the Batch mode parameters for Receiver JDBC Adapter

    Hi All,
             Could some pls tell me how to set bacth mode in receiver JDBC adapter and what are its parameters and how to configure them. i beleive there is something like max count parameters etc..
    Regards,
    Xier

    Hi,
    Check this for more info
    http://help.sap.com/saphelp_nw04s/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    Regards
    Seshagiri

  • Want Batch mode in the Receiver  JDBC adapter

    Hi,
      My scenario is  File  to JDBC .  from the source file I'm getting  20 records for file. after processing by XI while inserting the records into database level but due to some problem  some records are not inserting.. suppose first 5 records got successfully inserted. but 6th record  due to unique contarin problem that was failed. but  due to this problem remaing records are also not inserting from the 6th record onwards it was not inserting any more records . 
       But i want to process all the Records or If any error is there in those records i want to fail all the records. I dont want any partial posting of the data.
    Plesae suggest me some solution for this.
    Regards
    Jain

    Hi Joel,
        Already i have selected that Batch Mode in Advanced tab.  my  transport protocol is JDBC 2.0 .
    And my SQL query is only INSERT  . in the mapping i have mapped action tag to  INSERT Command  for  inserting the rows... 
         still  my SQL query is inserting first 5 records only out of 20 records ... if the sixth record contain any problem  the process has been terminating .
       Please suggets me some solution for avoiding those problems. if any error is there then i want to fail teh complete message otherwise process all the records.   I dont want any partial posting of the file.
    Regards
    Jain

  • Batch Processing of records using JDBC adapter

    Dear all,
    We are working on JDBC-JDBC scenario and the flow is as below. Source is ORACLE and Target is SQL SERVER.
    We need to pick up 2000 records from Source . PI should split them ito 4 batches of 500 each and should insert in SQL DB.While inserting the records, if there are any errors, those records should sent back to Source again. It is Synchronous scenario.
    1) But as far as I know Batch Processing mode, INSERT option cannot be used.(From SAP help)
    2) Will the connection break if we are sending the error records back to sender.
    Any thoughts would be helpful.
    regards,
    babu

    Hi,
    The below links may help U.
    JDBC ADAPTER
    http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
    /people/saravanakumar.kuppusamy2/blog/2005/01/19/rdbms-system-integration-using-xi-30-jdbc-senderreceiver-adapter
    /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30 - File to JDBC
    JDBC - http://help.sap.com/saphelp_nw2004s/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm
    multiple tables with JDBC - http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    JDBC Response /people/swaroopa.vishwanath/blog/2006/12/28/send-rfc-to-sap-xi-150-asynchronous
    Regards
    Pullarao

  • JDBC adapter in BE mode

    Hi all,
    Scenario: JDBC to RFC synchronous.
    Rows are picked from DB and fed as input to RFC. On successful RFC response, one of the DB field(Status) has to be updated to 'P'(processed)
    For this i have configured,
    JDBC sender adapter in BE mode
    RFC receiver adapter
    When i execute the scenario,
    JDBC sender adapter picks data from the DB,
    Mapping to RFC structues happen propely
    RFC is executed successfully and RFC response is mapped to JDBC receiver structure (we followed help.sap.com for creating JDBC response structure)
    We find that the message has been successfully precessed in Adapter mointor but the status field in DB is not updated. When we see sxmb_moni, we find that the JDBC response structure is getting created as required.
    My questions are :
    1) <b>Can JDBC adapter be configured in BE mode..?</b>
    2) Why is the adapter monitor showing no error when hte record is not being updated in the DB..?

    Hi Siva,
    This might be because you might have given someother value for the ACTION attribute. As you are trying to update a particlar field, this attribute value has to be set to UPDATE.
    Check out the SAP documents on how the value of the ACTION attribute determines what kind of SQL query will be executed.
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    Also, check out these docuements for your receiver and sender JDBC adapters,
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    Hope this helps,
    Regards,
    Bhavesh

  • Response message timed out - JDBC adapter - PI 7.1

    Hi All,
    I have a synchronous Proxy <-> XI <-> JDBC scenario. The interface works fine in most of the cases, but when my proxy sends data to UPDATE the receiver SQL server 2000 with more than 1000 records, I do not find the response message in SXMB_MONI. But all the records have been successfully updated in SQL database. The response message in my case is the number of records that have been updated.
    Initially I got the message "Synchronous response expired" in RWB, and based on SAP note 791379 and 1078420 , I changed the xiadapter.inbound.timeout.default parameter from 180000 to 600000 and added the parameter 'sqlquerytimeout' in my receiver JDBC adapter configuration with value as 600 seconds.
    I have also enabled batch mode in my receiver adapter.
    Now my problem is I don't see any error message in RWB , but still in SXMB_MONI I am not able the response  message, but can see only the log version of my request message.
    Any idea on what needs to be done in this case ? Any help will be greatly appreciated.
    Regards,
    Sandeep

    Hello,
    Could you pease let us know how thiswas solved ?
    Same problem i am having.
    Thanks in advance

  • RECEIVER JDBC ADAPTER----ROLLBACK IN XI

    Hi Gurus,
    I have a scenario with the receiver as JDBC adapter.If there is any error in updating to Database during the interface flow,how do Rollback occurs in XI???
    Please help......
    Regards,
    Sriparna

    Hi Sripam1,
    select SQL statement 'batch mode' ,
    i.e,
    see
    8. Defining Parameters in Advanced Mode
       6. If you want to collect SQL statements in a batch, select Batch Mode.
    of the SAP online help
    [Configuring the Receiver JDBC Adapter|http://help.sap.com/saphelp_nwpi711/helpdata/en/48/465581929734d9e10000000a42189d/content.htm]
    Also ensure that 'Database Auto-Commit-Enabled (No Transaction Handling)' is not enabled.
    Regards
      Kenny

  • Jdbc adapter error on confirmation message in message monitor (rwb)

    I have the scenario iDoc -> PI 7 - > jdbc (AS400 odbc driver).
    When I do INSERT statements, the data is stored in the Database and the RWB message monitoring shows status Successfull.
    However, for every insert, an other message shows up in the message monitoring with reversed Sender and Receiver (so it looks like a confirmation message is trying to find its way back to XI). This message first is is Status "Waiting", and after some time gets in Status "System Error".
    As I am not expecting any responses in my XI configuration (as I have no place to send them to), I want to stop these messages showing up in the Adapter Engine (as there will be many Error Status messages that are of no interest to me).
    How can I stop these messages, or what should I do in XI to process them (and dump them in my receiver determination). I have NO  BPM involved .

    Hi,
    For each open connection a entry is made j2ee stack.So when the it reaches to max and execption is thrown.
    In Jdbc adapter configuration -> advance mode -> Set -> Disconnect from the database after processing each message.
    Should solve the prob
    <b>Cheers,
    *RAJ*
    *REWARD POINTS IF FOUND USEFULL*</b>

  • JDBC Adapter in async. scenario

    Hi everybody.
    I have the following scenario:
    R/3  --->  XI ---> Legacy
    In this scenario, there is at the moment a synchronous call from XI -> Legacy using the JDBC receiver adapter. In this call there are various SELECTs and UPDATEs, so I have to use the XML SQL format of the JDBC receiver adapter.
    Unfortunately, the processing of the synchronous call is quite slow, and from time to time there even is a timeout which aborts the whole process. In order to get this process to work I only see two solutions:
    a) increase the timeout values of the synchronous call
    b) switch from synchronous to asynchronous processing
    I don't like solution a) because it could possibly influence others aspects of our XI system as well, so I prefer b).
    However, I do not know how to do it or even if it is possible at all...
    Is it possible to split up the synchronous call in an asynchronous request/response pair and to use correlation in a BPM?
    Is JDBC receiver adapter capable of this usage scenario?
    Regards, Joerg

    Hi everyone!
    Thanks for the valuable input.
    Alas, I still have a problem...
    I did the following: I inserted a dummy SQL statement into my request XML message. This dummy statement simply inserted an ID into the SELECT, and this ID is returned "as is" in the result. I use this ID to create a correlation between an asynchronous SEND step in my BPM and an asynchronous RECEIVE step in the same BPM. Unfortunately it seems to me that the JDBC adapter is not capable of working in an asynchronous mode. I have created a receiver adapter, I send my SQL XML message - and I get <i>no</i> return. It seems to me like the response message (my SQL XML should generate a response) "vanishes" - there is no answer...
    Is there some kind of "trick" I have to apply in order to get the JDBC receiver adapter to work in this scenario?
    Regards, Joerg

  • Strange behavior of JDBC Adapter

    Hello everybody!
    I found a pretty strange behaviour of JDBC Receiver Adapter during problems with network (big thanks to our Basis). According to the status in Adapter Engine, the message wasn't processed. In the database I can see these inserts. However, there are more lines in the XML than lines in the database. So, how it is possible that adapter commits only part of inserts. Logs and settings see below.
    My XML includes a SQL_DML statement and a few INSERT statements, each contains many inserts.
    It looks like that:
    <?xml version="1.0" ?>
    <MyMessage>
        <statement>
            <table1 action="SQL_DML">
                <access>here I delete old values</access>
            </table1>
        </statement>
        <statement>
            <table2 action="INSERT">
                <access>some data</access>
            </table2>
        </statement>
        <statement>
            <table3 action="INSERT">
                <access>some data</access>
            </table3>
        </statement>
    </MyMessage>
    Part of adapter log is here:
    Information
    Message successfully put into the queue
    Information
    The message was successfully retrieved from the receive queue
    Information
    Message status set to DLNG
    Information
    Delivering to channel: Adapter_Name
    Information
    MP: processing local module localejbs/CallSapAdapter
    Information
    Receiver JDBC adapter: processing started; QoS required: ExactlyOnce
    Information
    JDBC Adapter Receiver Channel Adapter_Name: Processing started; party / service BS
    Information
    Database request processed successfully
    Error
    MP: exception caught with message Ack handling failed: creation of messageFactory failed: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Connection JDBC_http://sap.com/xi/XI/System is currently not started.
    Error
    Exception caught by adapter framework: Ack handling failed: creation of messageFactory failed: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Connection JDBC_http://sap.com/xi/XI/System is currently not started.
    Error
    Delivery of the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.lang.Exception: Ack handling failed: creation of messageFactory failed: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Connection JDBC_http://sap.com/xi/XI/System is currently not started.
    Information
    Message status set to WAIT
    Information
    The asynchronous message was successfully scheduled to be delivered at ...
    Information
    Message status set to TBDL
    Information
    Retrying to deliver message to the application. Retry: 1
    Information
    The message was successfully retrieved from the receive queue
    Information
    Message status set to DLNG
    Information
    Delivering to channel: Adapter_Name
    Information
    MP: processing local module localejbs/CallSapAdapter
    Information
    Receiver JDBC adapter: processing started; QoS required: ExactlyOnce
    Information
    JDBC Adapter Receiver Channel Adapter_Name: Processing started; party / service BS
    Error
    Unable to execute statement for table or stored procedure. 'Table' (Structure 'statement') due to com.microsoft.sqlserver.jdbc.SQLServerException: Violation of PRIMARY KEY constraint 'fields'. Cannot insert duplicate key in object 'Table'. The duplicate key value is (field values).
    Error
    JDBC message processing failed; reason Error processing request in sax parser: Error when executing statement for table/stored proc. 'Table' (structure 'statement'): com.microsoft.sqlserver.jdbc.SQLServerException: Violation of PRIMARY KEY constraint 'fields'. Cannot insert duplicate key in object 'Table'. The duplicate key value is (field values).
    Error
    MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'Table' (structure 'statement'): com.microsoft.sqlserver.jdbc.SQLServerException: Violation of PRIMARY KEY constraint 'fields'. Cannot insert duplicate key in object 'Table'. The duplicate key value is (field values).
    Error
    Exception caught by adapter framework: Error processing request in sax parser: Error when executing statement for table/stored proc. 'Table' (structure 'statement'): com.microsoft.sqlserver.jdbc.SQLServerException: Violation of PRIMARY KEY constraint 'fields'. Cannot insert duplicate key in object 'Table'. The duplicate key value is (field values).
    Error
    Delivery of the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'Table' (structure 'statement'): com.microsoft.sqlserver.jdbc.SQLServerException: Violation of PRIMARY KEY constraint 'fields'. Cannot insert duplicate key in object 'Table'. The duplicate key value is (field values).
    Adapter settings:
    Maximum concurrency: 20
    Persistence: Local
    Conflict Resolution: Redo
    Advanced Mode: On
    Number of Retries of Database Transaction on SQL Error: 0
    Transaction Isolation Level: serializable

    Dear All,
    Follow the steps below to resolve the "Connection JDBC_http://sap.com/xi/XI/System is currently not started." issue:
    1. Log in to NWA
    2. Navigate to Operations -> Systems -> Start & Stop
    3. Click on Java Services tab
    4. Search  the service Service "XPI Adapter: JDBC"
    5. Select the service XPI Adapter: JDBC and click on Restart button
    With the restart of JDBC Service in NWA, the channels should start working properly
    Regards,
    Shreyansh

  • JDBC Adapter - transaction handling

    Hi,
    I have a question. I use graphical Message Mapping and standard documents formats for Receiver JDBC Adapter.
    Now I need to push a delete call and insert calls in one message looks like that one f.e.:
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_CostcentreUpdate xmlns:ns0="http://rtl.de/xi/TransCostcenter">
    - <StmName>
    - <dbTableName action="DELETE">
      <table>KOSTENSTELLEN</table>
      </dbTableName>
    - <dbTableName action="INSERT">
      <table>KOSTENSTELLEN</table>
    - <access>
      <KOSTL>0000001000</KOSTL>
      <GUELTVON>2005-09-01</GUELTVON>
      <GUELTBIS>9999-12-31</GUELTBIS>
      <ABTEI>Test1</ABTEI>
      <VERAK>Name1</VERAK>
      <KHINR>K1000_1010</KHINR>
      <KTEXT>Test1</KTEXT>
      </access>
    - <access>
      <KOSTL>0000001001</KOSTL>
      <GUELTVON>2005-03-01</GUELTVON>
      <GUELTBIS>9999-12-31</GUELTBIS>
      <ABTEI>Test1</ABTEI>
      <VERAK>Name2</VERAK>
      <KHINR>K1000_1010</KHINR>
      <KTEXT>Test2</KTEXT>
      </access>
    - <access>
      <KOSTL>0000001006</KOSTL>
      <GUELTVON>2006-04-01</GUELTVON>
      <GUELTBIS>9999-12-31</GUELTBIS>
      <ABTEI>Test1</ABTEI>
      <VERAK>Name3</VERAK>
      <KHINR>K1000_1010</KHINR>
      <KTEXT>Test3</KTEXT>
      </access>
      </dbTableName>
    </StmName>
    </ns0:MT_CostcentreUpdate>
    Because I need to do both (delete & insert) in one transaction mode. But i will not work at the moment
    I always get error:
    com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'KOSTENSTELLEN' (structure 'StmName'): java.sql.SQLException: FATAL ERROR document format: invalid level 5' found (structure 'StmName')
    Thanks for any help
    Matt

    Hi Matthias,
    you need to have two statements (StmName), one for delete, one for insert.
    Regards,
    Udo

Maybe you are looking for