Create SQL Receive Locations Programmatically.

|  Posted: May 25, 2007  |  Categories: BizTalk Server

One of our recent projects involved creating an orchestration, which was bound to a physical one way receive port polling data from SQL server.  There will be multiple SQL receive locations for the same receive port. The receive locations will have different polling conditions based on the customer. Our requirement was to create one receive location per customer. So, we’ll be adding more SQL receive locations as the customer base increases.  For that reason I created this function (part of a bigger client application) which create SQL receive location programmatically, which uses BizTalk Catalogue explorer object (no WMI). Hope this will be helpful to some one, because there is minor things to take care of.

You can download the .CS file from here.
The below figure shows a SQL receive location created with help of the above function.

How To Execute it:

Here is the sample code, which is used to run the function.

string server “SK_WORKSTATION”;
database “ORDER_POLLING”;
address “SQL://” + server + “/” + database + “/” + Guid.NewGuid().ToString(); 

, address
“exec [GetSQLActivationMessage] @AccountNumber=’007′”
“Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=sa;Initial Catalog=ORDER_POLLING;Data Source=SK_WORKSTATION”
“Data Source=(local);Initial Catalog=BiztalkMgmtDb;Integrated Security=true;Trusted_Connection=True”

NOTE: The function assumes you already got a “Receive Port” (which you pass as second argument to the function), but its not hard to create it inside the function.


Author: Saravana Kumar

Saravana Kumar is the Founder and CTO of BizTalk360, an enterprise software that acts as an all-in-one solution for better administration, operation, support and monitoring of Microsoft BizTalk Server environments.

Back to Top