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”;
string 
database “ORDER_POLLING”;
string 
address “SQL://” + server + “/” + database + “/” + Guid.NewGuid().ToString(); 

CreateAndConfigureSQLReceiveLocation(
“Receive.SQL.Autogenerated.SK1”
“Receive.Sch.Orders.Internal.SQL.1Way.AllPollingService.ActivationMessages”
, address
“False”
“Minutes”
“10”
“DocumentRootElement”
“http://www.digitaldeposit.net/samples/SQL/schema”
“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.

Nandri!
Saravana

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.

One Platform Operations, Monitoring and Analytics Software
BizTalk360

microsoft biztalk

Learn more

Over 500 customers across 30+ countries depend on BizTalk360

ServiceBus360

Azure Composite Application

Learn more

Start manage and monitor your Azure Services in minutes

One Platform - Operations, Monitoring and Analytics Software
BizTalk360

microsoft biztalk

Learn more

Over 500 customers across 30+ countries depend on BizTalk360

One Platform - Operations, Monitoring and Analytics Software
ServiceBus360

Azure Composite Application

Learn more

Start manage and monitor your Azure Services in minutes

Back to Top