How do you configure a BizTalk WCF-SQL adapter to get data from a SQL Server 2012 “always on” replica database?

*爱你&永不变心* 提交于 2019-12-05 18:04:05

There is no way of doing this via the WCF-SQL adapter. We have had to go with an external helper class to create the connection with a connection string and query the database.

Update: A Blog written by a colleague on the issue Can I use a BizTalk WCF-SQL send adapter with a SQL 2012 Always on Database? a snippet quoted below.

In summary I think your choices are (in order of preference):

  • Disable AlwaysOn Availability Groups / Mirroring on SQL server if you need to connect to this SQL server which has this enabled

  • Disable transactions and implement logic to be able to handle duplicates .

  • Disable transactions and handle the duplicates or lost messages with custom logic (e.g. Send twice and compare and implement error handling). You need to write your own DTC handling this which is probably very complicated.

  • Disable transactions and live with risk of duplicates or lost messages without handling duplicates.

I think you'll need to go WCF-Custom + sqlBinding to specify a connection string.

In that link you gave, they did it in the connection string. Look at the last item in it:

Server=tcp:AGListener,1433;Database=AdventureWorks;
IntegratedSecurity=SSPI;ApplicationIntent=ReadOnly

Looks easy enough...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!