Use BTSTask to import or export BizTalk settings

Overview

Using the BTSTask command-line utility, you can export the settings from a BizTalk Server environment and import them to another BizTalk Server environment, thereby reducing the overall time-to-solution. This is especially useful in scenarios where the administrators try to tune BizTalk Server performance in a staging environment, and upon achieving the desired results, they can import the settings into a production environment.

This topic lists the steps to import or export the BizTalk Server settings from one environment to another using BTSTask.exe.

Import BizTalk settings

Important

To import the BizTalk settings from a certain environment, you should have already exported and saved those settings in an XML file. For more information about exporting the settings, see Import or export BizTalk Settings Using Settings Dashboard or Export BizTalk Settings Using BTSTask (in this topic).

By importing the XML file, you can replicate the required BizTalk Server settings on the target machine. Using the BTSTask.exe, you can import the Group, Host, and Host Instance settings and map the properties of one to another. Following are the necessary assumptions for importing the settings:

  • You can import the BizTalk Server settings across similar topologies.

  • You should be able to map the source Host and Host Instances to the destination counterparts.

  • The destination environment has hardware similar (if not identical) to the source environment. This is essential as some of the settings depend on the underlying hardware.

ImportSettings command

You can use the ImportSettings BTSTask command to import BizTalk Server settings from the source environment to destination environment. See ImportSettings Command for specific details.

You can define the mapping from a source host to a destination host and/or a source host instance to a destination host instance as shown:

<?xml version="1.0" encoding="utf-8" ?>   
 HYPERLINK "file:///C:\\Users\\v-dhgunt\\AppData\\Local\\Microsoft\\Windows\\Temporary%20Internet%20Files\\Content.Outlook\\05083AAB\\ImportMap_PosScenario.xml" - <SettingsMap>  
 HYPERLINK "file:///C:\\Users\\v-dhgunt\\AppData\\Local\\Microsoft\\Windows\\Temporary%20Internet%20Files\\Content.Outlook\\05083AAB\\ImportMap_PosScenario.xml" - <HostMappings>  
 HYPERLINK "file:///C:\\Users\\v-dhgunt\\AppData\\Local\\Microsoft\\Windows\\Temporary%20Internet%20Files\\Content.Outlook\\05083AAB\\ImportMap_PosScenario.xml" - <SourceHost Name="BizTalkServerApplication">  
  <DestinationHosts>BizTalkServerApplication</DestinationHosts>   
  </SourceHost>  
 HYPERLINK "file:///C:\\Users\\v-dhgunt\\AppData\\Local\\Microsoft\\Windows\\Temporary%20Internet%20Files\\Content.Outlook\\05083AAB\\ImportMap_PosScenario.xml" - <SourceHost Name="BizTalkServerIsolatedHost">  
  <DestinationHosts>BizTalkServerIsolatedHost</DestinationHosts>   
  </SourceHost>  
 HYPERLINK "file:///C:\\Users\\v-dhgunt\\AppData\\Local\\Microsoft\\Windows\\Temporary%20Internet%20Files\\Content.Outlook\\05083AAB\\ImportMap_PosScenario.xml" - <SourceHost Name="Host1">  
  <DestinationHosts>Host2</DestinationHosts>   
  </SourceHost>  
 HYPERLINK "file:///C:\\Users\\v-dhgunt\\AppData\\Local\\Microsoft\\Windows\\Temporary%20Internet%20Files\\Content.Outlook\\05083AAB\\ImportMap_PosScenario.xml" - <SourceHost Name="Host2">  
  <DestinationHosts>Host1;Host3;Host4;Host5</DestinationHosts>   
  </SourceHost>  
  </HostMappings>  
 HYPERLINK "file:///C:\\Users\\v-dhgunt\\AppData\\Local\\Microsoft\\Windows\\Temporary%20Internet%20Files\\Content.Outlook\\05083AAB\\ImportMap_PosScenario.xml" - <HostInstanceMappings>  
 HYPERLINK "file:///C:\\Users\\v-dhgunt\\AppData\\Local\\Microsoft\\Windows\\Temporary%20Internet%20Files\\Content.Outlook\\05083AAB\\ImportMap_PosScenario.xml" - <SourceHostInstance Name="BizTalkServerApplication:COMPUTER_NAME1">  
  <DestinationHostInstances>BizTalkServerApplication:COMPUTER_NAME2</DestinationHostInstances>   
  </SourceHostInstance>  
 HYPERLINK "file:///C:\\Users\\v-dhgunt\\AppData\\Local\\Microsoft\\Windows\\Temporary%20Internet%20Files\\Content.Outlook\\05083AAB\\ImportMap_PosScenario.xml" - <SourceHostInstance Name="Host1:COMPUTER_NAME1">  
  <DestinationHostInstances>Host2:COMPUTER_NAME2;Host3:COMPUTER_NAME3;Host4:COMPUTER_NAME4;Host5:COMPUTER_NAME5</DestinationHostInstances>   
  </SourceHostInstance>  
  </HostInstanceMappings>  
  </SettingsMap>  
  

In a map file, enter a host instance as 'HostName:MachineName'. For example: "Host1:Server1" means the instance of host 'Host1' which is running (or present) on machine 'Server1".

To enter 1:n source to destination mappings, use a semicolon-separated list. For example:

SourceHost Name="SourceHost1"   
......DestinationHosts   
............DestHost1;DestHost2;DestHost3   
....../DestinationHosts   
/SourceHost  

Only those host-instances can be mapped for which the corresponding host mapping has also been created. If 'SourceHost1' has been mapped to 'DestinationHost1' in host mappings, the instances (if any) of 'DestinationHost1' can be mapped only to the instances (if any) of 'SourceHost1'. The UI Import Wizard takes care of this constraint. You would need to explicitly write it in the map file.

Export BizTalk settings

There are a couple of ways to export the BizTalk settings:

  1. Use the ExportSettings BTSTask command to export the BizTalk Server settings of the source environment to an XML file. See ExportSettings Command for more details.

  2. Use the Settings Dashboard in BizTalk Server Administration. See Import or export BizTalk Settings Using Settings Dashboard for the steps.

Tip

For information about how the BizTalk Server settings in an XML file are applied to the target environment, see Import or export BizTalk Settings Using Settings Dashboard.

See Also

Automate BizTalk Server Performance Tuning