This article tells about our recent experience with an installation of BizTalk Server 2016 in high availability configuration with SQL Server 2016 Always On. It’s just a small experience, but I hope it can be useful for anyone who wants to install a BizTalk infrastructure in high availability on Microsoft Azure or in a virtual environment where cluster failover is not well accepted by system engineers.
There are several articles dealing with this topic and we highly recommend reading them carefully.
In addition, we suggest you to read the article related to Master Secret Server configuration in cluster (https://docs.microsoft.com/en-us/biztalk/core/how-to-cluster-the-master-secret-server1).
To design our server infrastructure, we referred to the scenario suggested by the Microsoft article.
Anyway, our implementation is smaller than the examples you can see in the article. This because it often happens to have the need for configurations in high availability but not to have a very high load.
As recommend, we have grouped BizTalk Server databases into the following four SQL Server instances:
The subdivision of the instances is due to the fact that MSDTC on SQL Server 2016 Always-On Availability Group is not able to handle distributed transactions between multiple databases within the same instance. We are all waiting for BizTalk to support the 2017 version of SQL that is able to do that.
In this specific case we don’t need ESB toolkit databases and BAM Analysis and Alert, so our final cluster implementation is illustrated in the figure below.
As you can see, we have configured one Listener for each SQL Server instance.
We do not report the installation and configuration of SQL Server as it is extensively described in the articles we referred to.
SQL Server Installed Features
On each server node and node instance we have installed the following services and features:
Database Engine Services
In this configuration it is not necessary to configure a DTC instance as a cluster resource because a local DTC instance will be used.
To enable Network DTC Access on the BizTalk Server and the SQL Server follow the step below:
In the Start menu, open “dcomcnfg”.
Or, open Administrative Tools, and then select Component Services.
Or, open Server Manager, select Tools, and then select Component Services.
Expand Component Services, expand Computers, expand My Computer, and expand Distributed Transaction Coordinator.
Right-click Local DTC, and select Properties.
Go to the Security tab, and check the following:
Select OK. If prompted to restart MS DTC, select Yes.
Enable remote access to COM
Follow the instructions in the following article to enable remote access to COM.
Cluster resource check
From the failover cluster management console, enable the prevent back option in each resource group created.
This may be your preferred setting because it allows you to control when the failback occurs. For example, you may want to select Prevent failback if you want to take time to troubleshoot or run diagnostics on the failed node before allowing the node to take ownership of the SQL Server again.
Availability Group Options
Make sure Availability Groups are configured with the Per Database DTC Support option.
Also configure “Readable Secondary” equal to “Yes”. Otherwise the SSO service could generate the following error:
|Failed to contact the SSO database: The target database, ‘SSODB’, is participating in an availability group and is currently not accessible for queries. Either data movement is suspended or the availability replica is not enabled for read access. To allow read-only access to this and other databases in the availability group, enable read access to one or more secondary availability replicas in the group. For more information, see the ALTER AVAILABILITY GROUP statement in SQL Server Books Online.
Data Source=***;Integrated Security=SSPI;Initial Catalog=SSODB
Error code: 0x800710D9, Unable to read from or write to the database.
Finally, you must check that “Primary” has been selected in the Backup Preferences tab, in the “Where backup should occur” configuration setting.
After completing the installation of SQL Server, before proceeding with the installation of BizTalk, you need to install the Enterprise Single Sign-On master secret server.
We will follow this article regarding the installation of the clustered SSO service: https://docs.microsoft.com/en-us/biztalk/core/how-to-cluster-the-master-secret-server1.
We will set up a cluster group that will contain IP address, Network Name and a generic service resource for the SSO service.
Execute the following step on both SQL Server nodes.
Enable only the following components
- Enterprise Single Sign-On Administration Module
- Enterprise Single Sign-On Master Secret Server
Execute the following step on first SQL Server node
Execute the following step on second node
To configure SSO in failover cluster follow the below steps:
- Restart the Enterprise SSO service on the first node
From the command prompt type the following command:
“<drive>:\Program Files\Common Files\Enterprise Single Sign-On\ssomanage” -updatedb XMLFile
Where XMLFile is a file with the following content “<sso><globalInfo><secretServer>[SSO NET NAME CLUSTER RES]</secretServer></globalInfo></sso>”.
- Configure manual start type the “Enterprise Single Sign-On Service” service on both servers.
- From the failover cluster management console create a Generic Services resource for the SSO service
- Restore the master secret on the second cluster node
Configure SSO Database replica
Before to start to configure SSODB database replica you have to execute e full backup of database.
Install BizTalk Server Application Server
Before starting with the BizTalk Server installation, the prerequisites must be installed. Follow the step described in the Microsoft article https://docs.microsoft.com/en-us/biztalk/install-and-config-guides/set-up-and-install-prerequisites-for-biztalk-server-2016.
The article shows a series of mandatory and optional steps. Following what I have done:
Execute the following step on both BizTalk Servers.
Enable all available components
BizTalk Configuration (First Node)
In general, the configuration of the first BizTalk node creates configuration databases while the configuration of the second node is limited to joining the existing farm.
BizTalk Configuration (Second Node)
Final Database Configuration
Now that all the databases have been created it is necessary to proceed with the configuration of the replica within the different SQL Server availability groups. Below are the steps to configure the BizTalkMgmtDb database.
Repeat these steps for each database created by the configuration procedure.
Linked Server & Job
Linked servers and jobs are automatically created by the configuration procedure, anyway it is better to verify that they have been created on both nodes.
It is also necessary to modify all the steps of each job to include the control that the server running is the primary one. So, include the original step inside the following code:
[original step commands]
I suggest to use the validation script for BizTalk Availability Group (https://skastberg.wordpress.com/2017/06/30/validate-your-biztalk-availability-groups/) in order to check the configuration, it is a very useful tool.
I want to thank my colleague Paolo Barbieri who helped me to reason during this little adventure and write this article.