Address should be unique for Receive Location – error when creating a Receive Location in BizTalk

Assume you’re using the WCF SQL Adapter (part of the BizTalk Adapter Pack 2.0). You decide to create 2 Receive Locations (RL), in order to poll the database. Each RL polls a different table (e.g., the “PollingStatement” binding property in the first RL is “SELECT * FROM T1”, while the “PollingStatement” binding property in the second RL is “SELECT * FROM T2”).

Since the tables are present in the same database on the same SQL Server instance, the URI which you enter is the same in both RLs (e.g., something like “mssql://servername/instancename/databasename”).

However, BizTalk doesn’t allow you to create multiple RLs in the same BizTalk application with the same URI. From the BizTalk point of view, it’s like having 2 RLs competing in the same BizTalk application for the same incoming messages. Even though in this (the WCF SQL Adapter) case, both RLs are pulling in messages from different sources (the “PollingStatement” controlling the message source).

There is a pretty simple workaround for this. You can use the following (different) URIs in each ReceiveLocation:

“mssql://servername/instancename/databasename?SomeUnusedQueryParameter=1”

“mssql://servername/instancename/databasename?SomeUnusedQueryParameter=2”

“mssql://servername/instancename/databasename?SomeUnusedQueryParameter=etc”