Answered by:
About biztalk receive location working process

Question
-
Hi i have a receive location with pooling interval 2 min.
in procedure at the end i am updating flag 0 to 1.
if procedure executes with in 2 min ,then flag update to 1 so no issue.
if procedure takes more than 2 min i want to know another instance is started /it will wait till the first one executes?
Thursday, October 27, 2016 7:45 AM
Answers
-
Thank team for the hat tip.
I am 96% sure the WCF sqlBinding will not stack polling operations. Meaning, even if one exceeds the Polling Interval, it will not start another.
What I've never had occasion to notice is whether the timer starts at the beginning of a polling operation or at completion of the previous.
This is pretty easy to test. You can put a WAITFOR DELAY statement in a test SP and see what happens.
- Proposed as answer by Ed Price - MSFTMicrosoft employee, Owner Friday, October 28, 2016 2:24 PM
- Marked as answer by Rachit SikroriaModerator Friday, November 4, 2016 1:47 AM
Thursday, October 27, 2016 11:34 AMModerator -
Hi Dinesh
Let me direct you to this excellent article by John on managing this-
In short, you have to control/flag records at the beginning of the procedure so that a different invocation of the Stored Procedure from a subsequent Polling action does not interfere with the earlier invocation. You will also find this explained in below thread-
http://stackoverflow.com/questions/2165668/biztalk-receive-port-reading-twice-from-db
Thanks Arindam
- Edited by Arindam Paul RoyEditor Thursday, October 27, 2016 8:40 AM
- Marked as answer by Rachit SikroriaModerator Friday, November 4, 2016 1:48 AM
Thursday, October 27, 2016 8:38 AMModerator -
Hi dineshNad,
Refer the article written by Johns-305,
BizTalk Server: SQL Patterns for Polling and Batch Retrieve
It is a wonderful article and describes how to achieve your Scenario..
Regards
Mandar Dharmadhikari
- Marked as answer by Rachit SikroriaModerator Friday, November 4, 2016 1:48 AM
Thursday, October 27, 2016 8:59 AMModerator
All replies
-
Hi Dinesh
Let me direct you to this excellent article by John on managing this-
In short, you have to control/flag records at the beginning of the procedure so that a different invocation of the Stored Procedure from a subsequent Polling action does not interfere with the earlier invocation. You will also find this explained in below thread-
http://stackoverflow.com/questions/2165668/biztalk-receive-port-reading-twice-from-db
Thanks Arindam
- Edited by Arindam Paul RoyEditor Thursday, October 27, 2016 8:40 AM
- Marked as answer by Rachit SikroriaModerator Friday, November 4, 2016 1:48 AM
Thursday, October 27, 2016 8:38 AMModerator -
Hi Dinesh,
First of all can you let us know what you are trying to do in your sproc?
apart from you can use below approach
use some flag at the starting of your stored procedure so it can help to determine whether your procedure need to proceed or not.
like if you are selecting some fields from some table then first take the unique values in temp table to set the flag present in the table to 0 to 1 means you already taken those values so if your next instance will start after two minutes then also it will not read the values which is already in use.
Regards
Abhay Giri
Mark this as answered or vote , if this help you.Thursday, October 27, 2016 8:41 AM -
Hi dineshNad,
Refer the article written by Johns-305,
BizTalk Server: SQL Patterns for Polling and Batch Retrieve
It is a wonderful article and describes how to achieve your Scenario..
Regards
Mandar Dharmadhikari
- Marked as answer by Rachit SikroriaModerator Friday, November 4, 2016 1:48 AM
Thursday, October 27, 2016 8:59 AMModerator -
Hi,
1)
Means if procedure taking time more than 2 min, another instance will start ?
2) if another instance started that is also taking more than 2 min then, another instance will start... this chain continuous and data base is blocking completely.
Thursday, October 27, 2016 9:25 AM -
Hi Dinesh,
If the Polling Data Available Check query reports that there are rows which can be polled,those data will be polled after polling interval by the polling query..but keeping the update of the flag at the beginning you can manage the records in much better ways..
But if the polling data is available, the Recive Location will poll the data ..you can manage the polling interval if needs be
Regards,
Mandar Dharmadhikari
- Edited by Mandar DharmadhikariModerator Thursday, October 27, 2016 9:31 AM
- Proposed as answer by Ed Price - MSFTMicrosoft employee, Owner Friday, October 28, 2016 2:25 PM
Thursday, October 27, 2016 9:31 AMModerator -
The correct way to handle this is to write your procedure in a specific way that handles this as shared in the article and link above.
Thanks Arindam
Thursday, October 27, 2016 9:37 AMModerator -
Ok i can handle as in the link. this will only correct the issue to not pick the already picked txn.
As i will pick for every 5 sec.
, means fist instance started updated the first txn flag and it takes more than 2 min,
then next instance started before first one completed and updated the Second txn flag and it takes more than 2 min
if it continuous..... data base is completely blocking.
what is the solution for this.
- Edited by DineshNad Thursday, October 27, 2016 11:35 AM
Thursday, October 27, 2016 11:34 AM -
Thank team for the hat tip.
I am 96% sure the WCF sqlBinding will not stack polling operations. Meaning, even if one exceeds the Polling Interval, it will not start another.
What I've never had occasion to notice is whether the timer starts at the beginning of a polling operation or at completion of the previous.
This is pretty easy to test. You can put a WAITFOR DELAY statement in a test SP and see what happens.
- Proposed as answer by Ed Price - MSFTMicrosoft employee, Owner Friday, October 28, 2016 2:24 PM
- Marked as answer by Rachit SikroriaModerator Friday, November 4, 2016 1:47 AM
Thursday, October 27, 2016 11:34 AMModerator -
Hi Johns,
Great i am expecting this answer.
I will test as you said.
Also need to know about sql adapter , is this also work like WCF or not?
Thursday, October 27, 2016 11:43 AM -
You should be using the WCF SQL Adapter/sqlBinding.
The legacy SQL Adapter has been deprecated for nearly 10 years now.
- Proposed as answer by Ed Price - MSFTMicrosoft employee, Owner Friday, October 28, 2016 2:24 PM
Thursday, October 27, 2016 12:23 PMModerator