Renaming your BizTalk machine

Published on : Aug 27, 2008

Category : BizTalk Server



Anyone who been working on BizTalk server long enough will know renaming a BizTalk machine is not a trivial task. It always involves quite a bit of manual work, things like
  • Un-configure the existing setting either using the UI or ConfigFramework /U switch
  • Deleting the Databases manually,
  • Re-Configuring it, which will raise tons of errors.
It’s never been a smooth procedure. Recently I had to go through this painful process, because due to corporate policy changes, they renamed all of our developer workstations. Here I’ll explain how we utilized the Disaster Recovery scripts available as part of BizTalk installation to help us rename the BizTalk machines smoothly (mainly without the pain of un-configure and re-configure). If everything goes smoothly you should be done in less than 10 minutes. Disclaimer: Do this at your own risk, it worked for me.

Edit SampleUpdateInfo.xml file:

  • Navigate to the following folder C:Program FilesMicrosoft BizTalk Server 2006SchemaRestore and open the file SampleUpdateInfo.xml file in your favourite editor.
  • Find and Replace all the “SourceServer” value with your original Server name
  • Find and Replace all the “DestinationServer” value with your new Server name.
  • Stuff related to Analysis, BAM, RuleEngine, HWS, and EDI are commented by default, if you are using them in your environment un-comment the required ones.
  • Save and Close the file.

Run the scripts to update database and registry:

Run the following command in the command prompt cscript UpdateDatabase.vbs SampleUpdateInfo.xml This script will update all the BizTalk databases with the correct server name. You need to run this script only once in a multi BizTalk server environment. Run the following command in the command prompt cscript UpdateRegistry.vbs SampleUpdateInfo.xml This script will update the local registry with the correct server name. You need to run this script on each BizTalk server you have in the group.

Restart WMI Service:

Open the Service control manager (services.msc) and restart the “Windows Management Instrumentation” service. This step is required because most of the administration tasks you perform from the admin console depends on WMI.

Promote the new server as master secret server:

Follow the steps outlined in this link to promote your new server as master secret server.

Configuring the BizTalk Administration Console:

Open the BizTalk administration console, click on the existing node (the one pointing to original server), right-click and remove. Right click on the “BizTalk Server 2006 Administration” node and select “Connect to Existing Group…”. Provide the new Server Name and select the BizTalkMgmtDb database. Click Ok.

Update your Visual Studio project properties to point to new Server:

Most of your Visual Studio BizTalk projects will be still pointing to the old management db server. Trying to deploy your project will result in an error message like this “Login failed for the user ”. The user is not associated with a trusted SQL Server connection.

Couple of Caveats:

At this point you should be able to see a working BizTalk Group. I experienced couple of problems, 1. When your try to expand the “Platform SettingsAdapters” and select any adapter from the list, you’ll see an error message like this “Unable to load adapter handler for XXXX adapter. (Microsoft.BizTalk.Administration.SnapIn) Access Denied (System.Management)biztalk admin console The machine name in the error message is pointing to my old server name. I wrote a small console application utilizing the BizTalk WMI classes and they all worked fine. It shows clearly the wrong server name is stored somewhere and the admin console is trying to connect to the old server. BTW there won’t be anything in the event viewer to assist you 🙂 I opened the SQL Management studio and made the following changes in the BizTalk Management Database (BizTalkMgmtDb) 1. adm_group table, SSOServerName Column: This one had the original server name, I entered the new server name 2. adm_server table, Name column: Again this one had the original server name, I entered the new server name. Restart all the BizTalk/SSO services. NOTE: These procedures were performed on a Windows XP workstation (single BizTalk installation), SQL Server installed on the local machine. No named SQL instance. The procedure should work for Windows 2003 on a remote SQL Server with multiple BizTalk servers. I’m not sure about the SQL Named instance setup(example people using SQL Express, where the instance name will be for example ServerNameEXPRESS).