Error handling at JDBC Receiver

Hi,
I am currently working on PI 7.31. This is regarding proxy to JDBC scenario using insert statement in the JDBC receiver. I would like to know is there any feature in JDBC receiver which allows the process to continue even after any data error in the insert statement by skipping the error records and finally collecting all error records and sending through alert configuration to the administrator. Currently process stops whenever any error happens in insert statement at JDBC receiver.
Regards,
Rama.

Hello,
I would suggest you to go with SP.
By default, PI will handle the transaction and in case of any errors it will rollback the entire statement. So u can allow SP to handle the transactions by asking ur DB team to create a SP with a try/catch statement and in case of any errors while performing DML operations catch those exceptions and log those erroneous records in some exception log table and continue the SQL process.
Eventually, either using SQL mailer or some windows services u can send a consolidated mail to the stakeholders. Just check with ur DB team since these are very normal stuff so i am quite sure ur DB admin would certainly help u on the same.
Thanks
Amit Srivastava

Similar Messages

  • Error Handling in JDBC Adaptor - Without BPM

    Hi friends,
    My problem is like this. Scenario is File -> Xi -> JDBC.
    here i didn't used BPM at all.
    My interface is working fine.
    right now i am not doing any error handling for 'Primary key violation, refrential intigrity etc.. '.
    if this type errors encountered i going to adapter monitoring and looking out the issue.
    Now the client requirment is
    whenever this type of errors occured Client should be notified Via email along with error description.
    Is there anyway to do this ?

    Hi Suresh,
    You can setup the Alerting framework of XI to trigger alerts. Alert rules can be set to raise alerts in case of JDBC Adapter Errors.
    Check these links....
    http://help.sap.com/saphelp_nw04/helpdata/en/3f/81023cfa699508e10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/80/942f3ffed33d67e10000000a114084/frameset.htm
    Thanks & Regards,
    Renjith
    An addition to what i just said...You have to be on SP14 for this...
    Message was edited by: Renjith Andrews

  • How to handle the jdbc receiver error

    hi,expert:
      I have a synchornous scenario:SAP/ECC(Proxy) to JDBC(SQLServer),ECC Send the message and insert data into the  database,when insert sucessfully the receiver returns the count of the sucessfull inserted  record . Not use store    procedure.
    I have a problem: When insert into the table occurs errors,like insert Duplicated record,how can i capture this exception and return  to the ECC? And if it is possible to solve this problem by using fault message?
         wait for reply ,thanks!

    Have you identified why duplicate record error coming?? you dont want to insert duplicate records in DB?? then in this case you contraol sending data in Proxy it self,
    If you want response (error message or success status from Data base you can design/develop easily, JDBC recv will support syn communication.
    even you can go for fault message type to handle this error,
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/dd/b7623c6369f454e10000000a114084/content.htm
    Regards,
    Raj

  • Error while using Jdbc receiver adapter

    Hi,
    Iam using a receiver jdbc adapter to update a table in my database.Here iam using 'UPDATE' as my action in the mapping.It is giving the foowing error....
    Error while parsing or executing XML-SQL document: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure)
    Can Please anybody tell me what may be the problem with my scenario...
    Thanks & Regards,
    Radhika.

    Hi ,
         action type should be attribute .  Please go through the following structure for update .
    <b>
       <?xml version="1.0" encoding="UTF-8"?>
    <ns1:MT_RESPONSE xmlns:ns1="http://com/Test">
       <STATEMENT_NAME>
          <TABLENAME action="UPDATE">
             <TABLE>Utility</TABLE>
             <access>
                <Updated_On/>
             </access>
             <key>
                <TrnHisID/>
             </key>
          </TABLENAME>
       </STATEMENT_NAME>
    </ns1:MT_RESPONSE></b>
              query for above we may say as
    <b>UPDATE  Utility set  Updated_On='' where  TrnHisID =''</b>
              Hope it helps
    Regards.,
    V.Rangarajan

  • Exception Handling in JDBC Receiver

    Hi,
      We have  a scenario WS to JDBC synchronous. If we inserting the same value we got the unique  
      constraint error in sxmb_moni level.But the WS response contains delivery exception error. But we
      need the Actual error in the response.
      How can get this?
      Any suggestions..
    Regards,
    Prakasu

    hi gabriel,
      I think serializable use for sending data to the DB in a serialized queue.
      AutoCommit used for when the data is inserted or updated in a Database it will commit the records.
      Disconnect from database used for when our transactions over the chennel disconnect to the database.
      But for my reuirement is when we inserted the same record or some varations in the record(like if DB have
      the field (number) But we passed the value in Char) that time DB send a Application error response to the
      XI server.
      We are using WS to JDBC.
      The error we can see in sxmb_moni.But the response of WS have simply "Delivery Exception system
      error". So with out seeing the sxmb_Moni message we dont know the exact error.So we need the
      "DB Application error" response in the WS response.
    Thanks and Regards,
    Prakasu

  • Error while executing JDBC receiver and sender CC

    Hi,
    Iam trying to RFC to JDBC scenario.
    when i do e2e testing iam facing error as "Configuration error: com.sap.aii.af.service.util.configuration.MandatoryParameterMissingException: Value missing for mandatory configuration attribute tableEOColumnNameId" in CC monitoring and "error reading SAP_XIAdapterFramework from SLD" in SXMB Moni.
    Also while performing JDBC to RFC  iam facing errror as
    "Error during database connection to the database URL 'jdbc:sqlserver://20.198.16.115\SQLSERVER2005:14330;databaseName=SAPHRDataStore' using the JDBC driver 'com.microsoft.sqlserver.jdbc.SQLServerDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:sqlserver://20.198.16.115\SQLSERVER2005:14330;databaseName=SAPHRDataStore': SAPClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver'"
    Please help me in this regard.
    Regards
    Madhu

    It should be com.microsoft.jdbc.sqlserver.SQLServerDriver
    I think you have it as com.microsoft.sqlserver.jdbc.SQLServerDriver
    Thanks
    Praveen M

  • Error handling in JDBC

    Hi All,
    i am using store procedure to fetch the data from Oracle Data base and send the data to SAP system using PI.
    I get some 1,00,000 records at a timeall needs to be sent to SAP. Suppose 1 record fails either in PI or inSAP, i need to rollback all the records and reprocess them.
    is there any other alterantive way to reprocess only the failed records?
    Thanks,
    Hemanth.

    I recommend you to have 2 SP, one into the other. the main SP will be called from PI, this SP run internaly the second SP wich will validate each record to be exchanged. those record that are corrected should be marked in the same table or in an auxiliar table. i recomend the same table. later the main SP will pass only the records that are right. but consider that all the records that are right(all field are completed for example) doesnt mean that wont fails by functional errors in SAP.
    now as your requirement if any records fails you must do a rollback, so reprocess all the fails record is not possible because you send all data -->right and wrong.
    i recommend you to validate if is possible to save in SAP all the failed record and the trigger and alert to check those record in the DB and the send only those records in another interface(for example). because if one record fails you do a rollback and only capture this record but you don know if there are others.
    for example. you send 1000 records and at SAP side the record 200 fails and you do a rollback and notify that this record is wrong. but maybe others record could be wrong if you continue executing. record 350,356,400, etc.
    is clear my point?

  • JDBC Receiver CC Error

    Hi,
    I have configured JDBC Reciever Adapater and i have given the paramenter like following -
    JDBC Drvier : com.microsoft.sqlserver.jdbc.SQLServerDriver
    Connection : jdbc:sqlserver://<dbServer>:14330;databaseName=<dbName>
    (Note - with the above details we have a sender channel which is perfectly working fine)
    JDBC Receiver Channel in RWB is giving the following error in adapter channel monitoring -
    Configuration error: com.sap.aii.af.service.util.configuration.MandatoryParameterMissingException: Value missing for mandatory configuration attribute tableEOColumnNameId
    Please help me.
    Thanks in Advance!!

    Check these threads:
    Error while executing JDBC receiver and sender CC
    Re: JDBC Adapter  Conect to Oracle Database
    and this:
    http://help.sap.com/saphelp_nw70/helpdata/en/b0/676b3c255b1475e10000000a114084/frameset.htm
    Regards,
    ravi

  • JDBC receiver error urgent

    Hello Friends,
    I am using file to JDBC scenario.
    i am getting following errors in the JDBC receiver though i have set all the parameters correctly.
    the same scenario is working when i used XI server but it is giving errors when i am connecting to remote server.
    i used sun.jdbc.odbc.JdbcOdbcDriver driver for the same.
    Error when attempting to get processing resources: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: DriverManagerException: Cannot establish connection to URL 'jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=//bomwsap020/sugeet/AIP/DATABASE/Flight.mdb': SQLException: [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'.  It is already opened exclusively by another user, or you need permission to view its data.
    Please help on this.
    thanks in advance.
    Best Regards,
    Sugeet.

    hi Sugeet
    first check whether your user has the right to access Data base
    Then check whether you have deployed the drivers correctly
    You have to deploy the required JDBC drivers for the database before making connection. Ask the database provider or your vendor for the drivers That should be deployed using SDM tool
    Start visual admin of XI and select service "Deploy" and then select option "Deploy and start" to select file and deploy it
    Three option available:
    1. Using SDM
    2. Using Visual Admin
    3. Using NW development studio (Not available for Production)
    We will use Visual Admin u201CDeployu201D deploy service to deploy
    Steps:
    1. Goto VM->Deploy service
    2. Select option u201CDeploy and startu201D
    3. Select EAR file provided for deployment
    4. Restart the service.
    5. Done
    follow this guide on how to install external libs for JMS/JDBC
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/how%20to%20install%20and%20configure%20external%20drivers%20for%20jdbc%20and%20jms%20adapters.doc
    regards
    Sandeep
    If helpful reward points

  • BPM Question: JDBC Sender to RFC to JDBC Receiver

    I have the following requirement:
    JDBC Sender Adapter (by nature Asynchronous) – SELECT multiple rows from a table
    To…
    RFC Receiver Adapter (Synchronous)
    To…
    JDBC Receiver Adapter (Synchronous) – UPDATE multiple rows in a table
    Then…
    IF <SAP:Error> XML is returned from the JDBC Receiver Adapter, I want to either issue a CCMS alert, or utilize the XI Email Adapter for error notification. 
    ELSE, if <root_response> XML is returned from the JDBC Receiver Adapter, do nothing.
    This obviously requires a BPM.  If I use the JDBC Receiver Adapter Asynchronously (with no error handling) this is a piece of cake.  But after trying to use it synchronously along with error handling logic, I am stuck.
    This issue that I am facing is how to logically handle the JDBC Receiver Adapter Response XML in the BPM.  I would like to know what I need to do in the BPM in order to issue a CCMS alert (and/or send a message through the XI Email Adapter) ONLY if the <SAP:Error> XML is returned. 
    Below are examples of the 2 types of response messages that I would receive back from the JDBC Receiver:
    Error:
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
      <!--  Call Adapter -->
      <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapterFramework</SAP:Category>
      <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'SAP_OrderImport' (structure 'StatementName2'): java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Violation of PRIMARY KEY constraint 'PK_SAP_OrderImport'. Cannot insert duplicate key in object 'SAP_OrderImport'.</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Success:
      <?xml version="1.0" encoding="utf-8" ?>
      <root_response>
      <StatementName1_response>
      <update_count>1</update_count>
      </StatementName1_response>
      </root_response>
    I have searched SDN for a while but did not find anything that specifically addressed this.  I would appreciate any help…

    Hi,
    In ur BPM wrap the jdbc send step with a exception block. in the exception block define a control step to throw an alert.
    so when the jdbc step fails, the exception is caught and an alert is generated by the control step.
    cheers,
    naveen

  • Transaction Handling - JDBC Receiver Adapter - Multiple SP Calls

    Hello,
    I have the following scenario:
    I send an XML-SQL structure with multiple statment elements (each of them calling a different stored procedure). A stored procedure raises an error back to the JDBC Receiver Adapter in case of error.
    Is it possible to have transaction handling in the JDBC Receiver to ensure:
    - Commit only after ALL stored procedures where succesful (no error risen during calls)
    - Rollback of ALL already called stored procedures in case an error has been risen
    How can I implement these requirements in the JDBC Receiver Adapter?

    One more comment, I have found the following info for JDBC Drivers:
    <i> "JDBC driver's default is to autocommit, meaning that the result of every SQL statement is permanent as soon as it is executed. This is why the course hasn't had to be concerned with transactions so far, and is perfectly acceptable in many cases."</i>
    So I think that each SP-Call is automatically commited in case autocommit on JDBC Driver Level is set to "true". Does anyone know where I can change these settings? Directly on JDBC Receiver Adapter or do I have to go to Visual Admin for those changes?

  • Handling Fault Messages for JDBC Receiver (Syn Inbound)

    Dear Freinds,
    Can we handle fault messages for JDBC Receiver which is synchronous.
    OB Proxy Syn  <>  IB JDBC Syn
    1. How to handle the same ? Please give some examples.
    2. Should we use Stored Procedures at Oracle side to handle the fault messages and send back as response to the Proxy Response. Will it work.
    Thanks & Regards
    K.Ramesh

    Dear Friend,
    I have 2 interfaces where Proxy is OB & JDBC is IB. In the first interface both sender and Receiver are synchronous and in the second one it is Async.
    In the first interface i have to send one field from R/3 table along with Native SQL query string to XI and the response of the SELECT query is sent back to the sender.
    Assume if no fields are selected based on the field sent then proper error message has to be sent instead of the response message.
    In the second interface i will be using UPDATE query at Asyn JDBC receiver.
    How to do this if you are having JDBC Receiver.
    I saw in many blogs where they had mentioned that we cannot handle fault messages in the Receiver JDBC.
    KIindly explain.
    Thanks
    K.Ramesh

  • Error while updating database using jdbc receiver adapter

    Hi All,
    I am trying to update a single record using jdbc receiver adapter.
    This is my the message that is getting created..
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:Data xmlns:ns0="urn:Test">
    - <STATEMENT>
    - <TABLENAME ACTION="UPDATE_INSERT">
      <TABLE>ORDERS</TABLE>
    - <ACCESS>
      <OrderID>99999</OrderID>
      <CustomerID>VICTE</CustomerID>
      <EmployeeID>3</EmployeeID>
      <ShipAddress>VICTE</ShipAddress>
      </ACCESS>
    - <KEY>
      <OrderID compareOperation="EQ">99999</OrderID>
      <ShipAddress compareOperation="EQ">VICTE</ShipAddress>
      </KEY>
      </TABLENAME>
      </STATEMENT>
      </ns0:Data>
    But in Adapter Monitoring i am getting the following error..
    <i>Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'ORDERS' (structure 'STATEMENT'): java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'VICTE'.</i>
    Regards,
    Rahul

    Rahul,
    > In this case i believe the interface has to be synch.
    > So what will the response message type be like..
    Not necessary. UPDATE can be asynch as well.
    Can you turn the trace on like pointed by Michal and then you can see the Query in the Audit Log of the adapter montioring. Try to execute the same query from your DB Client like TOAD and see what is the Syntax error you are getiing.!
    The problem looks like some field has some dataype / column name mismatch.
    Regards
    Bhavesh

  • Regarding the JDBC Receiver Communication Channel error

    Hi All,
    While executing Jdbc to Jdbc interface, i am getting error in jdbc receiver communication channel. please see below message for error description..
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Channel 'JDBC_AccntStatements_Receiver', Service 'BS_BusinessSystem', Party '': JDBC Adapter configuration not activated
    Note: the channel status is active and activated(not in change mode).
    Any idea on this error.
    thanks,
    Madhusudhan.

    Hi
    According to your Error Message,
    Saying that JDBC Configuration is not Active.
    Once again cross check all the config is Activated & also Test your Config Using Config Test Tool in ID
    And also check in RWB-Adapter Engine-Adapter monitoring ---select the option instaled & Started. whether the JDBC Adapter is working fine or not

  • JDBC Receiver Adapter -- Synch Select. ERROR

    Hello,
    We have implemented the scenario described by Bhavesh Kantilal in blog 3928:
    JDBC Receiver Adapter -- Synchronous Select – Step by Step 
    /people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
    but modified to our requirements.
    An Idoc is coming in, mapped to a sync receiver jdbc as described to collect data from a jdbc table.
    Result when connecting the oracle database with the jdbc receiver adapter:
    Error processing request in sax parser: Error when executing statement for table/stored proc. 'T_ST_MAINDRIVER' (structure 'STATEMENT'): java.sql.SQLException: ORA-00942: table or view does not exist
    Oh, like to complete the information by the payload from the jdbc rec. connect:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_JDBC_LOOPUP_ID xmlns:ns0="http://www.xxx.org/excel">
    - <STATEMENT>
    - <TABLENAME ACTION="SELECT">
      <TABLE>T_ST_MAINDRIVER</TABLE>
      <ACCESS />
    - <KEY>
      <MAINDRIVER compareOperation="=">Optomechanical</MAINDRIVER>
      </KEY>
      </TABLENAME>
      </STATEMENT>
      </ns0:MT_JDBC_LOOPUP_ID>
    The table exists on the database. So, what is our mistake? Do you have any ideas?
    Best regards
    Dirk
    Message was edited by:
            Dirk Meinhard
    Message was edited by:
            Dirk Meinhard

    Hi Anil,
    I am back on my JDBC problem and I am one step further!
    Thank you for this hint. Looks like this is the solution.
    So I like to add my next question !
    My new error is resulting from my query command.
    I have set "=" to find a specific entry as compare operation.
    Error when executing statement for table/stored proc. 'IRIS.T_ST_MAINDRIVER' (structure 'STATEMENT'): java.sql.SQLException: FATAL ERROR document format in structure 'TABLENAME': unexpected value '=' for attribute 'compare' found
    Looks like this is not ok .
    This is my xml of this query:
    <ns0:MT_JDBC_LOOPUP_ID xmlns:ns0="http://www.xxx.org/excel">
       <STATEMENT>
          <TABLENAME ACTION="SELECT">
             <TABLE>IRIS.T_ST_MAINDRIVER</TABLE>
             <ACCESS/>
             <KEY>
                <MAINDRIVER compareOperation="=">Optomechanical</MAINDRIVER>
             </KEY>
          </TABLENAME>
       </STATEMENT>
    </ns0:MT_JDBC_LOOPUP_ID>
    Can you, or anybody else, give the helping idea?
    regards
    Dirk

Maybe you are looking for

  • Import photos from DVD R

    I cannot get my drive in my Power Mac G5 to read DVD+R to import photos to iPhoto.  I use DVD-R but this disk is from a friend.  Doesn't read the disk at all and not displayed in "source" list.  Any ideas?

  • Not all files copy on to DVD/CDs

    hello. i have a macbook running OS 10.5.8 i need some help... when i burn a DVD or CD to back up files, not all files are being burned. about 50% are burned. any thoughts? thanks!

  • ICloud webmail problem.

    Hello, Having some trouble staying logged into iCloud webmail as of 3:30pm ET Tuesday 06/17/14. Every time I sign in it signs me out only seconds after logging on. This is happening on my 2013 iMac 27. I'm logging in through my Chrome browser. Anyone

  • I just installed CC and I have CS6.  Is there a way to migrate my CS6 helper apps, such as Portraitu

    help????

  • Adding Goldegate server to goldegnate monitor

    Hi, I have installed oracle goldengate monitor in my linux server(primary). Also i have configured goldengate and it replicating properly. Now i want to add both(primary&standby goldegate) need to add in goldengate monitor. Whether should i install g