none
WCF-OracleDB adapter polls data twice? RRS feed

  • Question

  • I am using a WCF-OracleDB adapter to perform a select query from Oracle database, but I found that the send port sends the same records twice to the FTP server. But send port sends only one record to the archive folder on the server. These two send ports are under the same send port group with a filter BTS.ReceivePortName==RecievePort. So it should either send 2 records to both the FTP server and the local archive folder or send only 1 record to both destinations.

     

    I think I remember SQL adapter has similar issue, but I can't recall where I saw this kind of thread before, anyone help, please?

     

    Thank you.

    Wednesday, October 19, 2011 8:13 PM

Answers

  • The answer can be found from this post:

    http://kentweare.blogspot.com/2009/04/clustering-biztalk-hosts.html

    Basically, you just need to create clustered host instances and only make one of them 'active'.

    • Marked as answer by Xiao Han Tuesday, November 8, 2011 12:53 AM
    Tuesday, November 8, 2011 12:53 AM

All replies

  • so if i understand correctly, your scenario is this:

    1. Oracle Polls on some DB (Receive Location)

    2. In the send port group, you have 1 FTP and 1 File Port.

     

    Now, if one of your FTP send port copies the file twice, while File Send port copies only once, it seems to indicate that there is something wrong with the FTP send port. If there were 2 messages being sent from your Oracle receive port, both send port would copy twice.

    Have I understood correctly, or am I missing something?


    -- Please mark as answered if this answers your question.
    Thursday, October 20, 2011 5:14 AM
  • Also check if you have any filter set on FTP send port. When using Send port group, it will always send a copy of the message to all the send ports part of that group. Now if you have a Filter on Send Port group, and a Filter on FTP send port, BizTalk will create 2 subscriptions, and resulting in FTP receiving 2 messages (one due Send Port group subsctiption and second due to FTP Send port subscription).

    HTH.


    Don't forget to mark the post as answer or vote as helpful if it does, Regards - Sathish Krishnan
    Thursday, October 20, 2011 5:59 AM
  • Following is the description provided in 'BizTalk 2010 Recipes' book.

    Filters: Filters on send port groups do not override filters on individual send ports. Filters used on both send ports and a send port group operate in a cumulative nature. If the same filter is used on a send port group as well as the individual send ports within the group, it is likely that duplicate messages will be sent. Special care must be given if filters are implemented on both send ports and send port groups.

    HTH.


    Don't forget to mark the post as answer or vote as helpful if it does, Regards - Sathish Krishnan
    Thursday, October 20, 2011 6:13 AM
  • I find out the reason was because the File send port did not refreshed, so the old version is still cached. Problem is solved after I stop all and start again, then bounce the host instance.

     

    I still can't figure out why the receive location for OracleDB poll the data twice, the polling interval is default to 500, I guess it means 500 seconds. But the duplicated polling seems happened within few seconds time.

    Tuesday, October 25, 2011 9:10 PM
  • Hi Xiao,

     

    As Sathish has already clearly mentioned above that you might have subscription filter(s) on your both send ports (FILE and FTP) and send port group. If you have duplicate subscription, then that will result in creating two messages for each message fetched from Oracle on both FTP and File location.

     

    If you are sure that you do not have duplicate subscription, then please provide me the following info:  

     

    • Is your Oracle receive location clustered?

     

    • Can you please provide the values for the following properties?

     

    ·         PolledDataAvailableStatement

    ·         PollingAction

    ·         PollingStatement (If you are calling a stored procedure, then can you please also briefly describe the logic used in the stored procedure)

    ·         PollWhileDataFound

    ·         PostPollStatement (If you are calling a stored procedure, then can you please also briefly describe the logic used in the stored procedure)

    ·         UseAmbientTransactions

    ·         TransactionIsolationLevel (If you don’t know how to find this property, then check this link http://msdn.microsoft.com/en-us/library/dd787944(v=bts.10).aspx)

     

    Regards,

    Zia


    Hope this helps. Zia Saeed | Don’t forget to mark the post(s) as “Answered” that answered your question
    Wednesday, October 26, 2011 12:54 PM
  • Hi Xiao,

     

    As Sathish has already clearly mentioned above that you might have subscription filter(s) on your both send ports (FILE and FTP) and send port group. If you have duplicate subscription, then that will result in creating two messages for each message fetched from Oracle on both FTP and File location.

     

    If you are sure that you do not have duplicate subscription, then please provide me the following info:  

     

    • Is your Oracle receive location clustered?

     

    • Can you please provide the values for the following properties?

     

    ·         PolledDataAvailableStatement

    ·         PollingAction

    ·         PollingStatement (If you are calling a stored procedure, then can you please also briefly describe the logic used in the stored procedure)

    ·         PollWhileDataFound

    ·         PostPollStatement (If you are calling a stored procedure, then can you please also briefly describe the logic used in the stored procedure)

    ·         UseAmbientTransactions

    ·         TransactionIsolationLevel (If you don’t know how to find this property, then check this link http://msdn.microsoft.com/en-us/library/dd787944(v=bts.10).aspx)

     

    Regards,

    Zia


    Hope this helps. Zia Saeed | Don’t forget to mark the post(s) as “Answered” that answered your question

    Hi Zia,

    We have two BizTalk servers on top of a clustered database, I guess this is why the same record got polled twice from each host instances.

    All the bindings are in default value,

    PolledDataAvailableStatement: SELECT 1 FROM DUAL

    PollingAction: (empty)

    PollingStatement: SELECT * FROM clarity

    PollWhileDataFound: False

    PostPollStatement: (Empty)

    UseAmbientTransaction: True

     

    I didn't setup TransactionIsolationLevel under Behavior tab.

    Thursday, November 3, 2011 7:38 PM
  • The answer can be found from this post:

    http://kentweare.blogspot.com/2009/04/clustering-biztalk-hosts.html

    Basically, you just need to create clustered host instances and only make one of them 'active'.

    • Marked as answer by Xiao Han Tuesday, November 8, 2011 12:53 AM
    Tuesday, November 8, 2011 12:53 AM