JDBC Sender Selects Queries

I know that the JDBC sender adapter can handle joins, but can it handle more sophisticated SELECT queries such as subselects, group by, rownum, etc.  In other words, are there any limitations in the SELECT query?
Thanks in advance.

Hi Bevan,
The only limitation with XI30-JDBC Sender Adapter is with Oracle Stored Procedure/Functions, as Oracle SP Query returns a cursor, and not a resultset.
Thanks
Prasad

Similar Messages

  • JDBC Sender select/update problem

    Hi all,
    we have a serious problem. We are running the scenario JDBC>XI>RFC. In the JDBC sender adapter we do a select statement (select * from table where flag='0') and an update statement (update * from table set flag ='1' where flag='0'). Now, the problem is that when we do the select statement a third party system may insert data in the database, so the update statement updates MORE rows than the select statement has selected.
    Does anyone knows a solution (or a workaround).
    TIA

    Hi peter,
    can you check the transcation isolation level of your Database?
    one option would be to make the database transaction such that the write transaction gets locked when even the READ is being done. So, when your JDBC is trying to select the data from the database, the WRITE will get locked and so, no entries will get selected and then, UPDATE will get executed.
    Though I havent tried this, wouldnt it be possible?
    Also, go through the help documentation and check the Adavanced Setting and the Transaction Isolation and see if any of the XI options can also solve your problem.
    Regards,
    Bhavesh

  • JDBC Sender - Select Query without Update Query

    In this case, how many times data will be polled within some minutes, if my polling interval is 1 day.
    How many messages in sxmb_moni?
    Thanks,
    Greg

    >>In this case, how many times data will be polled within some minutes, if my polling interval is 1 day.
    The communication channel executes once as soon as you activate your sender communication channel.  Now a single msg is sent to XI(with many as many rows as the select query fetches from the db).
    After that, it waits for the polling interval(in your case 24 hrs) and then executes again.
    This cycle continues. If you resart the communication channel, the cycle is disrupted and a new cycle starts.
    Hope I dont add to your confusion
    Regards,
    Jai Shankar

  • JDBC Sender - Wrong SELECT statement (Oracle driver)

    Hi,
    3 days ago I was having a problem with my JDBC Sender adapter [JDBC Sender adapter is reading but then there isn't the message in SXMB_MON; .
    Finally I discovered what's wrong but I can't understant why is not working. When I deleted the "WHERE" condition in my SELECT statement all worked OK (except that I need the WHERE statement...).
    Why that statement is not working in my JDBC Sender:
    SELECT * FROM MATERIALES WHERE LEIDO<>'X'
    and that statement works:
    SELECT * FROM MATERIALES
    The field "LEIDO" is my flag that I must set to X when I read with the UPDATE statement, so I need the where condition...

    Thanks Christopher but still not working
    I tried two new statements:
    1 - Escaping:    SELECT * FROM MATERIALES WHERE LEIDO <> 'X'
    2 - Changing the operator symbol: SELECT * FROM MATERIALES WHERE LEIDO != 'X'
    The nº1 gives me an error of invalid character
    The nº2 has the same effect than the other symbol, the adapter reads from the DB but no XML message is generated and no payload to check what's happening... just a message ID without information and without a message generated in SXMB_MONI

  • Update query not working in the JDBC sender Communication channel

    Hi,
    We are working on JDBC to File scenario. As per the configuration, XI should pick the data from SQL database every 20 secs and should update the corresponding flag. We are using subquery in the select and update statement as both header and detail tables are involved.
    Now the issue is, select query is working fine but update statement is not working as expected. It is somehow updating some other records rather than doing for the ones selected by the adapter.
    Moreover logSQLstatement is also not working. Hence we are unable to identify the records which are getting updated.
    Please advise.

    Hi Rumi,
    See Question 8. Transaction Handling (Sender) in [SAP Note 831162 - FAQ: XI 3.0 / PI 7.0 / PI 7.1 JDBC Adapter|https://websmp130.sap-ag.de/sap(bD1wdCZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=831162].
    8.  Transaction Handling (Sender)
    Q: If I have the following configured in a JDBC Sender:
    Select Query:
    SELECT column FROM TABLENAME WHERE FLAG = "TRUE"
    Update Query:
    UPDATE TABLENAME SET FLAG = "FALSE" WHERE FLAG = "TRUE"
    How do I know that the JDBC adapter will not update newly added rows (rows that were
    added between the time that the SELECT and UPDATE queries were executed) that were
    not read in the initial SELECT query?
    A: The SELECT and the UPDATE are run in the same DB transaction, i.e. both statements
    have the same view on the database.
    Make sure that both statements use the same WHERE clause. An additional
    requirement for the correct operation of this scenario is the configuration of
    an appropriate transaction isolation level on the database
    (i.e., repeatable_read or serializable). You might also consider using a
    "SELECT FOR UPDATE" statement instead of a plain SELECT statement to
    ensure proper locking on the database. "SELECT FOR UPDATE"
    is not supported in MS SQL database. In this case please make use of an
    appropriate transaction isolation level on the database. For more details
    please contact your DB vendors.
    After, see Transaction Handling Issues in [SAP Note 1039779 - JDBC Adapter issues(Escape character,Transaction handling)|https://websmp130.sap-ag.de/sap(bD1wdCZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1039779].
    Best Regards.
    Pedro Baroni

  • DELETE Querey in JDBC SENDER

    Hello all,
    I am trying the JDBC to file Scenario. There are 5 records in a table, i can see the records in the MONI being successfully picked by the sender jdbc adapter, after being picked up i want those records to be deleted. So i write a DELETE statement in the UPDATE SQL Querey but i cannot see those records deleted from the database. i think i need to specify some COMMIT which i am not sure of, can you please provide me your suggestions for deleting records from database.
    Thanks in advance

    SAP Note if from SAP Service Market place. The link is
    https://websmp103.sap-ag.de/notes
    And the content of this SAP note is -
    <i>Q: If I have the following configured in a JDBC Sender:
    Select Query:
    SELECT column FROM TABLENAME WHERE FLAG = "TRUE"
    Update Query:
    UPDATE TABLENAME SET FLAG = "FALSE" WHERE FLAG = "TRUE"
    How do I know that the JDBC adapter will not update newly added rows (rows that were added between the time that the SELECT and UPDATE queries were executed) that were not read in the initial SELECT query?
    A: The SELECT and the UPDATE are run in the same DB transaction, i.e. both statements have the same view on the database.
    Make sure that both statements use the same WHERE clause. An additional requirement for the correct operation of this scenario is the configuration of an appropriate transaction isolation level on the database (i.e., repeatable_read or serializable). You might also consider using a "SELECT FOR UPDATE" statement instead of a plain SELECT statement to ensure proper locking on the database.</i>
    Did you check this -
    <i>Processing can only be performed correctly when the Transaction Isolation Level is set to repeatable_read or serializable.</i>
    Regards,
    Moorthy

  • JDBC sender Adapter consistency and Transaction level - URGENT

    Hi,
    We are using the JDBC adapter to read data from an Oracle view. The view joins two tables on their keys where flag = 0. The JDBC adapter carries out the select and then updates the selected rows with flag = 1. The transaction level used is the default, which according to XI help is TRANSACTION_SERIALIZABLE.
    Our question is what happens if the oracle application that feeds the underlying tables inserts a new record in the time interval between the select statement and the update statement with flag = 0.
    WILL THE UPDATE STATEMENT UPDATE EVERYTHING, EVEN THE NEWLY INSERTED RECORD??
    As we are in a live environment and we have reason to believe that some records updated to FLAG = 1 are NOT sent to XI we would appreciate the expert's help on this issue!

    Dimitris,
    I was looking at the FAQ :JDBC Driver Snote and found this information which seems to answer ur question.
    Q: If I have the following configured in a JDBC Sender:
    Select Query:
    SELECT column FROM TABLENAME WHERE FLAG = "TRUE"
    Update Query:
    UPDATE TABLENAME SET FLAG = "FALSE" WHERE FLAG = "TRUE"
    How do I know that the JDBC adapter will not update newly added rows (rows that were added between the time that the SELECT and UPDATE queries were executed) that were not read in the initial SELECT query?
    A: The SELECT and the UPDATE are run in the same DB transaction, i.e. both statements have the same view on the database.
    Make sure that both statements use the same WHERE clause. An additional requirement for the correct operation of this scenario is the configuration of an appropriate transaction isolation level on the database (i.e., repeatable_read or serializable). You might also consider using a "SELECT FOR UPDATE" statement instead of a plain SELECT statement to ensure proper locking on the database.

  • Multiple select queries for JDBC sender

    I am working on JDBc to IDOC scenario.
    I need to process two select queries in PI where output of 1st query becomes the input of second.
    Now i need to map the output of second to IDOC through XSL mapping also i need to use BPM to process(without using the stored procedure) the scenario.
    In my JDBC communication channel i have option for only one select query and second query should fetch the data through BPM.
    In BPM i have used the following sequence mentioned below:
    Start --> Receive step ( receives all the header lines) --> Transformation (to split the header messages to single message) --> Block Start( To processEachRecord) --> Send Syn (to map the request message i,e. output of first query with Response i,e. structure of the second query)  --> Send Asyn (to send the output of second query to XSLT mapping) -->Block End --> stop
    Output of XSLT mapping is the input for IDOC
    Now i need to understand how to process the second query?

    >> I need to process two select queries in PI where output of 1st query becomes the input of second
    Use SQL Nested Queries. 
    Example:
    SELECT Model FROM Product WHERE ManufacturerID IN (SELECT ManufacturerID FROM Manufacturer
    WHERE Manufacturer = 'Dell')
    Here first table is Manufacturer .. we do select query in manufacturer to return data and pass it to the first table Product.
    >> Now i need to understand how to process the second query?
    You dont need at all. In your sender jdbc channel, write sql statement nested query and you will get only output of the second table. you map the second table output to the idoc.
    Note: Dont know why do you need BPM for this case..
    Jdbc sender adapter  help links
    http://help.sap.com/saphelp_srm40/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
    Check this thread for update statement in jdbc cc
    Re: sender jdbc adapter

  • Sender JDBC Adapter Select/Update Issue

    Dear All,
    We have configured a Sender JDBC Adapter to Poll data from the DB2 tables. It is working fine and both the select and the update queries written are also getting properly executed and are changing the status of the flag from Y to N once read from database.
    In the communication channel ->
    select * from <table> where flag = 'N'.
    update <table> set flag = 'Y' where flag = 'N'.
    But I have one doubt after executing the select query some new data comes into the table of status flag 'N"., then will this unselected data will also be updated to 'Y' .
    The question is while we do a select and update from XI on the DB table and at the same time there is an insert happening into the table from the other end how will the adpater behave in this case.Will it result in missing of some records during next select/update transaction from XI..
    Your inputs will be appreciated.
    Regards
    Amit

    Amit
    Did you ever get a solution to your question ?
       Sender JDBC Adapter Select/Update Issue  
    Posted: Apr 24, 2008 2:29 PM           Reply 
    Dear All,
    We have configured a Sender JDBC Adapter to Poll data from the DB2 tables. It is working fine and both the select and the update queries written are also getting properly executed and are changing the status of the flag from Y to N once read from database.
    In the communication channel ->
    select * from <table> where flag = 'N'.
    update <table> set flag = 'Y' where flag = 'N'.
    But I have one doubt after executing the select query some new data comes into the table of status flag 'N"., then will this unselected data will also be updated to 'Y' .
    The question is while we do a select and update from XI on the DB table and at the same time there is an insert happening into the table from the other end how will the adpater behave in this case.Will it result in missing of some records during next select/update transaction from XI..
    Your inputs will be appreciated.
    Regards
    Amit

  • Sender JDBC adapter SELECT / UPDATE issue - updates more rows than selected

    Hi,
    We have configured a Sender JDBC Adapter to poll records from an Oracle table based on a flag field and then update the flag for the selected records. When tested in DEV and QA environments (where test data comes in intermittently and not in huge volumes), itu2019s working fine.
    Both SELECT and UPDATE queries written in the Sender JDBC adapter are getting properly executed and are changing the status of the flag for the selected records from Y to N once read from the database.
    select * from <table> where flag = 'N'.
    update <table> set flag = 'Y' where flag = 'N'.
    But in the PROD environment (with records getting updated in the database every second), after XI executes the SELECT query and just before the UPDATE query is executed, new records come into the Oracle table with status flag 'N". So when the UPDATE query runs just after the SELECT query, then these unselected records also get updated to 'Y'. Thus these records never get into the resultset and hence XI and thus remain unprocessed.
    So when XI does a SELECT and UPDATE on the Oracle DB table and concurrently there is an INSERT happening into the table from the other end, the JDBC sender adapter is picking up a certain number of records but updating the status of more records than it picked up.
    So how does XI deal with such a common scenario without dropping records?
    Thanks,
    Vishak

    The condition being checked is the same for both SELECT and UPDATE statements.
    Initially I tried setting transaction isolation levels on the database to repeatable_read and serializable but it was throwing me a java.sql.SQLException error saying that these transaction levels were not valid.
    I asked for these transaction level permissions for the XI user from my DBA but the DB I am accessing provides only a view into other databases and so it's not possible.

  • Variable in Select statement JDBC sender

    Hi All,
    I am working on JDBC sender and this scenario is working fine. Now the legacy system has different enviroment for development, quality and production so I need to change the enviroment for each system.
    Is there any way I can make it as variable and the movment it system checks it's development of XI system then it should pick up right enviroment for legacy system and that can be used in select statement.
    My select statement looks like and highlighted one is the enviroment which needs to be a variable.
    select digits(HMOUTLT) as HMOUTLT, hmprodu as HMPRODU, HMCHKOQ as HMCHKOQ,  HMCHKiQ as HMCHKIQ, HMWKPER as HMKPER, HMLSDAT as HMLSDAT  from bi5filmm.bsimhp where hmprflg = ' ' and rrn(bsimhp) < 3000 and hmextdt = '2007-12-24'.
    I am not sure if value mapping can be used here or not.
    regards
    Ria

    solved

  • Execution time difference between SELECT & UPDATE statement in JDBC Sender.

    Hi Experts,
    In my scenario, I have used the JDBC Sender Adapter with the SELECT and UPDATE statement.
    Now the problem is in between the execution of Select and update statement, few more entries are coming in the same DB Table.
    So result of this is updation take place for those entries which are not even picked up by the select statement.
    Can we avoid this execution time difference between the SELECT & UPDATE statemet on JDBC Sender side???
    Thanks & Regards
    Jagesh

    Hi
    Use serializable option in additional parameters, now all new entries would also be updated.

  • PI 7.1 JDBC sender adapter huge load from DB select

    Hi,
    We have the problem that the JDBC sender adapter is selecting a huge amount of data from a Oracle DB. The Adapter seems to be able to cope the load but when sending to the integration server it causes problems. We found values to adjust but I dont think increasing them is a good solution.
    My question is:
    Is there any way to send the data in blocks with using the PI standard JDBC adapter ?
    Thank you and regards,
    Andreas

    Hi,
    You can use the below parameter in JDBC sender.
       Specify additional Parameter Names and Parameter Values in the table.
    Due to messages of large size it may cause issue
    Following are the parameters to be set in the table to limit the message size per polling:
    ●      msgLimit :
    ●      maxMsgSize :  SAP note 1253826.
    ●      maxRowSize : SAP note 1253826.
    Additional parameters are published in SAP Note 801367.
    Refer the link.
    Defining Additional Parameters in Advanced mode
    http://help.sap.com/saphelp_nw73/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm

  • JDBC Sender -Not selecting records

    Hi all
    I have set up a JDBC sender. The communication channel monitor shows that "Polling interval started" but It is not retrieving data from the JDBC table using a select statement.
    This is a sql select statement.
    SELECT * FROM table
    there is also a corresponding update statement.
    clearly ,XI is unable to pick up data from the table.
    if i change the name of the table , it does throw an SQL exception that the object doesnt exist. I have also checked with other tables and it is fetching data correctly. The table under problem does contain a row of data in ORacle side.
    Why doesnt XI select the records of the table?
    Any help will be highly appreciated
    thanks
    krishna

    Hi
    yes, the table does contain data
    and the sql stmnt is actually
    select * from table where flag= 'true' ( i also tried it without the where condition)
    here are the other parameters
    QOS : Exactly Once
    Poll interval: 6
    Document name: Resultset
    Update sql stmnt : UPDATE TBL SET FLAG = 'FALSE' WHERE FLAG = 'TRUE'
    hope this helps
    regards
    krishna

  • JDBC Sender - Different number of records selected and updated.

    Hi people,
    We have a JDBC -> Abap proxy scenario. The JDBC sender is pooling an Oracle database to retrieve data from a table X, each 30 minutes. The select and update statements in jdbc sender are below
    SELECT FIELD1, FIELD2, FIELD3 FROM MY_TABLE WHERE STATUS = 1
    UPDATE MY_TABLE SET STATUS = 2 WHERE STATUS = 1
    Sometimes the message sent to Abap proxy has, for example, 400 records. Looking at runtime workbench, message monitoring, for the same message there is a log like this
    Channel SENDER_JDBC_CHANNEL: Query executed successfully. Start update
    Channel SENDER_JDBC_CHANNEL: 510 row(s) updated successfully
    Someone has already experienced something like this? How can I handle this to guarantee to update only those read records?
    regards.
    roberti

    Hi All,
    Even we are facing the same problem.
    In our scenario, receiver is SAPR3. (IDOC)
    Will this parameter serialization work in our case?
    1. SELECT XBLNR, WERKS, MATNR, MDV01, BACKFLQUANT, STATUS, SAPTIMESTAMP, PITSTIMESTAMP, PMTIMESTAMP, BATCH FROM PMBPITS.PITS_UNITY WHERE STATUS = '01' and rownum<200 . 
    2. UPDATE PMBPITS.PITS_UNITY SET STATUS = '02' , SAPTIMESTAMP = sysdate WHERE STATUS = '01' and rownum<200  ( currently the value is rownum < 5 )
    Thanks!!
    Regards
    Gouri

Maybe you are looking for

  • Can I set up a pro forma for multiple images

    Hi all Well I am a newbie to Keynote and I am really enjoying using it. I am trying to set up a pro forma for class photos at a school, the photos have been handed to me by the teachers but are all slightly different sizes. My question is can I set u

  • How do i reset my ipod touch? i am locked out of it and it wont connect to my i tunes, what can  do ?

    ok so im locked out of my i pod touch, and i cant remember my password, and it wont connect to my i tunes... is there a way to reset or get into my i pod

  • How to ignore missing md5sums

    Hello, after a new pacman upgrade (3.3.0) makepkg now stops building when the md5sums are missing. This is a bit annoying if you have PKGBUILD which is fetching the pkgver via some command, like in my chromium PKGBUILD: pkgname=chromium-snapshot _rea

  • Reports are Larger

    I am in the process of migrating a collection of reports from native SSRS 2005 to SSRS 2008 R2 integrated with SharePoint 2010 Enterprise.  Reports that render within a minute in 2005 will not render in 2008 and usually crash the browser.  I have che

  • Error: No instance of object type PurchaseOrder has been created.

    Hi: I am using BAPI_PO_CREATE1 to create PO's using webdynpro. I get the following error message when I attempt to create a PO. No instance of object type PurchaseOrder has been created. External reference: Please help. Thanks Sriram