Unattended BizTalk configuration

At my work, we had several stream of development servers, each with a BizTalk 2013 in the middle tier processing business transactions. Yesterday one region messed up, give me that ‘failed to enable constraint error’, have googled a bit no news so have to reconfigure it.

Then it becomes interesting, our SQL and BizTalk deployed separately, every time I run the Configuration, for some reason, the configuration UI keep freezing after confirming the SQL Server information (I am guessing in the backend it is trying to discover the network to find all the SQL Servers or something??) After spend two hours with no progress and kill a few froze windows, I am enough of this thought about if there any way to automate this.

Turns out this is fairly easy, for us, since we have so many development streams, they only differ by the database names, e.g. for uat we named it _a1, for perf _a3, so I only have to export the existing configuration to an xml

image

Update the xml with correct database also the credential

image

then use the command line to configure, it only took around 10 minutes!!  (I also borrowed a powershell script to create the host instances)