This week I am working on a small project to reconfigure the applications on test and production BizTalk 2006 Servers. The servers have several BizTalk applications all running under the same default BizTalk host. As an initial setup we want to create one host per application to isolate each different interchange, and will look into isolating certain adapters, send ports, receive locations or orchestrations later. We will also create a host that will be dedicated to tracking (note: configure only one host to perform tracking per BizTalk group, otherwise the Tracking Data Decode Service running on the hosts will deadlock each other ).
Applications in BizTalk Server 2006 and BizTalk Server 2006 R2 are no more than logical groupings of artifacts (orchestrations, send ports, receive ports, receive locations, schemas, maps, pipelines, etc). But the BizTalk applications aren’t bound to a specific host. Each orchestration can be configured to run on a specific host, and receive locations and send ports can be configured to run on specific adapter handlers on different hosts. This allows us to have a more granular control over what artifact runs on which host.
As I mentioned before, for this project we want to get everything under an application to run under the same host (unless this application uses isolated adapters, then there will be an extra host for these adapters).
To accomplish this we will have to perform the following for each application:
1 – Create a new host.
2 – Create one host instance for the host.
3 – Create receive and send handlers for each of the adapters used by the application.
4 – Stop receive ports and wait until all running instances have finished processing.
5 – Stop and unenlist the orchestrations.
6 – Update all orchestrations to run on the new host.
7 – Update all send ports to run on the new send handler for this host.
8 – Update all receive locations to run on the new receive handler for this host.
9 – Enlist and start orchestrations and start all receive locations and send ports.
Also, for adapters running on isolated hosts, we will have to create a separate isolated host and handlers, then configure the ports/locations using that adapter to run on them.
This process can be very repetitive and error prone. As I started to work on an C# application to help me automate part of this process I ran into this great (and I mean great!) tool by Saravana Kumar called BizTalk Host Configurator per Application. This tool will save me a few hours, it automates almost all of the steps above (excluding stopping and starting ports and unenlisting and reenlisting orchestrations). The only addition I made to it was to create an extra button that when clicked will export the current server configuration to file.