JDBC sender adapter provides incomplete data
Hi,
I have a JDBC sender adapter which reads data from a MySQL table, and passes it to a proxy which writes the data then in a SAP table.
- Query SQL statement = SELECT Field1, Field2, Field3, Field4 FROM jdbctest WHERE Processed = 'N'
- Update SQL statement = UPDATE jdbctest SET Processed='Y' WHERE Processed='N'
I did a stress test with a program that writes data simultaneously to the MySQL table (up to 10000 records), and the JDBC sender adapter which checks the table every 15 seconds.
At the end, my SAP table contained only 9965 records.
This means that probably there have been records added between the Query and the Update statement (So they haven't been read, but their status is changed).
Does anyone have a solution for this?
Best regards,
Nicolas De Corte
Hello Dharamveer,
I don't really understand your answer.
My point is that the JDBC adapter only processed 9965 records out of 10000, but it updated all 10000.
So now in my MySQL table there are 10000 records with status Processed, but only 9965 have been really processed. And I think this is because records have been added between the execution of query and the update statement.
Similar Messages
-
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 -
Data from 2 tables for jdbc sender adapter
how to pickup data from 2 tables at a time when using a jdbc sender adapter?
select <fields> from table1 where <condition>
union
select <fields> fromt table2 where <condition>
also u can combine this with joins as pointed -
How to update two tables in a single call using JDBC Sender adapter
Hello All,
The scenario is, database entries have to be selected from two tables and at the same time those tables have to be udpated with the flag.
We are using JDBC sender adapter and in Select Query, we are fetching the data by joinin the two tables.
Update Statemtent: We can only update one table using this statement.
Is it possible to update two tables using the Update Statement without using Stored Procedures.
Let me know.
Regards,
Sreenivas.Hi Sreenivas,
> Is it possible to update two tables using the Update Statement without using Stored Procedures.
Yes its possible through join statement
Check this links
Update in JDBC Sender adapter for more than one table
data from 2 tables for jdbc sender adapter
Regards
Ramesh -
JDBC Sender Adapter - No Namespace found
Hello
I am currently using PI 7.1. The scenario is JDBC to ECC ABAP Client Proxy. When the JDBC Sender Adapter sends the data to the Integration Server, the root element does not contain the xmlns attribute. This root element is constructed from the Document Name of the JDBC Sender Adapter attribute.
I am getting the following error:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Request Message Mapping
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
<SAP:Category>Application</SAP:Category>
<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
<SAP:P1>com/sap/xi/tf/_MM_HIS_Material_Consumption_</SAP:P1>
<SAP:P2>com.sap.aii.mappingtool.tf7.IllegalInstanceExcepti</SAP:P2>
<SAP:P3>on: Cannot create target element /ns0:MT_Material_</SAP:P3>
<SAP:P4>Consumption_ECC/Material. Values missing in queue~</SAP:P4>
<SAP:AdditionalText />
<SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_MM_HIS_Material_Consumption_; com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ns0:MT_Material_Consumption_ECC/Material. Values missing in queue~</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
When I perform a test at RWB, the message gets posted successfully. Once posted, the payload of this message contains the xmlns attribute.
Here is the root element from both the instances:
From RWB: <ns0:MT_Material_Consumption_JDBC xmlns:ns0="http://xxx.com/xxx/finance">
From JDBC Adapter: <ns0:MT_Material_Consumption_JDBC>
Could you please let me know, what has to be done to obtain the xmlns in the sender payload?
Thank you in advance.
John Jeyaraj
Edited by: John jeyaraj on Apr 7, 2011 8:22 AMHi Hiren
When I test the MM without the xmlns attribute, I get the following error:
The prefix "ns0" for element "ns0:MT_Material_Consumption_JDBC" is not bound.
When I add the xmlns attribute, the mapping is successful.
Thanks
John -
How to use sql variables in jdbc send adapter??
Hi,
i wanna use a variable in the sql statement in the jdbc send adapter.
i know i can key sql statement in the "Query SQL Statement" in the jdbc send adapter.but i dont know how to use variables in the sql statement.
i mean, for example, the sql statement is "SELECT * FROM t_student WHERE READFLAG = 0", but now i wanna instead of "0"(the value of the READFLAG) using a variable.
and if i can use a variable to replace the "0"(the value of the READFLAG above sql statement), then how can i send a value to the variable??
request help in the regard.
thx in advance.
BrianHi,
Use the place holders to pass the data at runtime. Check the below structure for more details.
Hope this helps.
Thanks and Regards,
Kalpesh
<root>
<stmt>
<Student action="SQL_QUERY">
<access> SELECT * FROM t_student WHERE READFLAG = '$FLAG$ </access>
<key>
<FLAG>0</FLAG>
</key>
</Student>
</stmt>
</root> -
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,
AndreasHi,
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 -
Problem with JDBC Sender adapter
hi guys!
I´ve problem in PI 7.0, with the JDBC Sender Adapter, execute select sentence and update status in Oracle database.
In RWB Message Monitoring and SXMB_MONI I can't see any message.
Someone have any idea how to fix it?
Thanks in advance.Hi David,
First check on the sender communication channel, if no data has been picked up by PI on channel,
then check the configuration of channel in the ID, especially select query.
If that is ok, then ask the sender application team(oracle database team) to run the query on their side
and to check if they are getting any data.
There could be the possibility of error in data also.
-Supriya. -
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,
VishakHi
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 sender adapter outofmemory error
Dear friends,
We are getting following error on JDBC sender Adapter: Error during conversion of query result to XML: java.lang.OutOfMemoryError: Java heap space (failed to allocate 1073741848 bytes)
I have read blogs where there have been suggestions to limit the amount of data picked by using WHERE condition and not using SELECT *
In our scenario we are creating GL IDOCs . In SQL when PI picks it up it needs to get all the corresponding Header and line items together. We cannot randomly pick 1000 records at a time. The SQL table has 500,000 rows in the following format
H H H L1 L1 L1
H H H L2 L2 L2
H H H L3 L3 L3
H1 H1 H1 L1 L1 L1
H1 H1 H1 L2 L2 L2
H1 H1 H1 L3 L3 L3
Please let me know how can we solve this issue?
Thank you,
Teresa
Edited by: Teresa lytle on Sep 27, 2011 3:13 PMIf you are using oracle database, uses ROWNUM field to fetch first set of records and you can update those records with the flag as true.
similarly If you are using MS SQL database, uses SELECT TOP command to fetch first set of records and you can update those records with the flag as true.
Like File/FTP adapter, the next poll interval would be as scheduled. The Administrator can then alter the table contents, to ensure lesser no of records are picked up.
Here You need to limit the no of rows if you again face the problem. Please chec the SAP Note
https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1296819 -
JDBC sender adapter, ...Processing parameters, Update SQL statement
in JDBC sender adapter, ...Processing parameters, there is an Update SQL statement field, can u tell me ...why this is required,,,,,and in one of the example scenario...it was given as <TEST>..
Sudheep,
In the sender JDBC adapter you have the select query to select data from the database.
Let us summer 2 cases,
1. You have <test> in the UPDATE . In this case, during every polling interval the JDBC adapter will end up selecting the same data from the Database. This would not be needed in most f the cases. Why would you want to select the same data over an over again?
2. If you have an update Statement in the Update field you can make sure that the data selected in the selected statement is updated so that the same rows are not selected again.
Take a look at this blog,
/people/yining.mao/blog/2006/09/13/tips-and-tutorial-for-sender-jdbc-adapter
Regards
Bhavesh -
JDBC Sender Adapter without polling?
Hi,
I need pick up some data from a Oracle 8.1 Database but I don't want to use a polling from a JDBC Sender Adapter. Because this impact the XI performance and we use several BPM's.
Any Ideas?Hi,
from SP19 you should be able to use
a scheduler with jdbc adapter but till then
you need to use some other solutions
maybe you can use a BPM which can be scheduled
(by any interface) and inside use receiver jdbc
adapter to do a select
or you can start the adapter manually whenever necessary....
Regards,
michal -
Hi,
Scenario: JDBC-XI-R/3
I am trying to run the JDBC sender adapter every 3 minutes based on the poll interval to select rows from Oracle db.
In the select and update statements when I use the rownum < '11' and flag condition (Y or N), then I see XI is picking up 10 rows in a two times and I see two parallel processes in SXMB_MONI.
I want XI to run only pickup 10 rows for every 3 minutes and update only 10 rows in Oracle to "N" from "Y".
When I take out the rownum condition from update I do not see this issue.
<u>Update statement:</u>
Update <TABLE> set status_flag = 'N' WHERE status_flag = 'Y' and rownum < '11'.
Can some body point me in the right direction ?
Thanks
SteveHi there,
See if this works. Though I never came across such a scenario, I can think what to be done in this case.
Create a staging table as same structure as from where our JDBC adapter is picking up the data currently.
Whrite a tigger(after delete) on staging table to call a stored procedure.
stored procedure will select the data from source table and insert them in to staging table (rownum<11) as well as update the flag column in source table.
Now load the staging table initially from source table with only 10 rows (one time process). Configure your JDBC adapter on staging table. In update sqlquery field of JDBC adapter write delete statement for all the data from staging table to be purged, as there will not be more than 10 rows at any time and after each time the adapter supplied Delete statement will purge the data so you dont have to worry about selecting 10 rows or updating 10 rows from JDBC adapter. As every time the trigger after delete statement will fire and load only 10 rows from source marking those 10 rows as read_already status.
NOTE: for Calling stored procedure from trigger follow your database SQL reference documentation.
Thanks.
-Nilkanth. -
JDBC Sender Adapter to Oracle Server
Hi Friends,
Iam using JDBC Sender Adapter to connect to Oracle Server. I have mentioned all the parameters in the Configuration(sender communication channel) correctly.My Adapter Monitoring in RWB shows a message that "Processing finished successfully"...But I cannot see the data in SXMB_MONI. I mean the data is not getting picked from the Database..I have worked on the similar scenario previously and it was working fine...
I have specified the datatype structure correctly.
resultset
>row
>>field1
>>field2
wat is the problem.
regards,
raju...Hi,
Can you check the following,
1. Check the SELECT query in your Sender JDBC adapter. Does it actually return any rows?
2. The values enterd for Documentname and DocumentNamespace in your Sender JDBC adapter. You have to enter the name of the Datatype and the namespace in these fields.
3.Have you enterd these details while doing the adapter configuration,
<b>jdbc:oracle:thin:@<IP adress>:<listener port>:<instance name (database name)>
Driver oracle.jdbc.driver.OracleDriver</b>
Regards,
Bhavesh -
Hi,
am I right in saying that the JDBC Sender Adapter can't request XI system level acknowledgements. Due to this it is necessary to establish an integrations process fed with the data from the sender adapter, sending it to the target system and receiving an acknowledgement?
Kind regards,
HeikoHi heiko,
a JDBC sender adapter cannot be configured Synchronously and so, what you are stating sounds perfect
If you want an update back to the database after execution , BPM is one way .
But, if you are looking to update some info immediately after sender adapter finishes its exectuion, then UPDATE statment can be used.
Regards,
Bhavesh
Maybe you are looking for
-
PLEASE HELP!!!!!!! i have had this problem for 2 months!
-
100% CPU usage during downloads in iTunes 7
Wow, ever since I installed iTunes 7, my CPU stays pegged at almost 100% utilization during iTunes downloads. Downloading podcasts, songs, video, etc. all cause the CPU usage spike. Running 2.26 Ghz P4 with 1 Gb RAM, 200 GB HD. Even when I'm only get
-
How do i enter in album name in the new version of itunes?
I have the latest version of iTunes and I can't figure out how to type in album name to a song. I fiddled around with it and I can't figure it out. Hope someone can help me out! Thanks in advance for any help provided. Cheers, Rachyl
-
OracleBI Spreadsheet Add-in disappears from Excel?
I left to work on something else (Word, web browsing, emailing), for 30mins or so, when I returned to my Excel the add-in disappeared. Right-clicking on any cell didn't give me the add-in either. This has happened to me a few times. Has anyone got th
-
Complaint about DVD writer...
i think the weakness point of apple product especially macbook is on their DVD writer... i have been using Macbook since macbook unibody white colour, then change to Mac book pro 2.5 gb, then now i change again to macbook pro 2.9 ghz... and all of th