Posts Tagged ‘Configuration’

Today I’m returning to one of my favorites topics … no not transformations, this time is all about “Errors and Warnings, Causes and Solutions”.

Today I encountered the following issue when I was trying to connect to a remove SQL Server database:

“The local MS DTC detected that the MS DTC on <server name> has the same unique identity as the local MS DTC. This means that the two MS DTC will not be able to communicate with each other. This problem typically occurs if one of the systems were cloned using unsupported cloning tools. MS DTC requires that the systems be cloned using supported cloning tools such as SYSPREP. Running ‘msdtc -uninstall’ and then ‘msdtc -install’ from the command prompt will fix the problem. Note: Running ‘msdtc -uninstall’ will result in the system losing all MS DTC configuration information.”

MSDTC-has-the-same-unique-identity

CAUSE

The error message is quite lucid about the main reason of this error, this normally occurs when the machines are cloned: “systems be cloned using supported cloning tools such as SYSPREP.

SOLUTION

This is one of those very few cases that the error message will give us the actually cause of the problem and the solution: “Running ‘msdtc -uninstall’ and then ‘msdtc -install’ from the command prompt will fix the problem.”

So, to solve this problem you need to:

  • Click Start, and then click Command Prompt.
  • At the command prompt, type “msdtc -uninstall”, and then press ENTER.
  • At the command prompt, type “msdtc -install”, and then press ENTER.

Note: To perform this procedure, you must have membership in Administrators, or you must have been delegated the appropriate authority.

However, after I resolve this condition by uninstalling and then reinstalling the Microsoft Distributed Transaction Coordinator service (MSDTC), when I access the BizTalk Administration Console and try to refresh (F5) the Group Hub Page I got this additional error:

“The Microsoft Distributed Transaction Coordinator (MSDTC) may not be configured correctly. Ensure that the MSDTC service is running and DTC network access is allowed on the BizTalk, SQL and SSO Master servers. For more information, see "MSDTC Configuration settings required for BizTalk Server" in the BizTalk Server Help.”

MSDTC-may-not-be-configured-correctly

I try to restart the MSDTC service or other services like the Enterprise Single Sign-On Service without any success… to avoid spending more time around this issue, and because this was a DEV standalone machine, I decided to restart the server… and that did the trick, after the restart everything was working without any problem.

Microsoft announced on October 27, 2016 the release of Microsoft BizTalk Server 2016 – the 10th major release of BizTalk Server –and, as usual with previous versions, I updated my installation and configuration manual for BizTalk Server 2016. This whitepaper will explain in detail – a step-by-step guideline – how to install and configure Microsoft BizTalk Server 2016 on a standalone environment running Windows Server 2016. This information will help you plan the installation and configuration of BizTalk Server 2016, applications and components on which it depends focused on creating a development environment (you can also follow this tutorial to help you create production environments, however if this is the case you need to skip some steps).

BizTalk-Server-Installation-scenario

Assumptions and out of scope

It will be assumed that the operating system: Windows Server 2016 and latest critical Windows updates from Microsoft already have been installed.

In this scenario, it will be performed a full installation of Microsoft BizTalk Server 2016, with the exception of the deprecated SharePoint Adapter (SharePoint Services Service Side Object Model (SSOM)). The following components will be installed:

  • Enterprise Single Sign-On (SSO).
  • BizTalk Group.
  • BizTalk Runtime.
  • Business Rule Engine.
  • BAM Tools and Alerts.
  • BAM Portal.
  • BizTalk EDI/AS2 Runtime
  • Microsoft BizTalk Adapters for Enterprise Applications (BizTalk Adapter Pack)
What’s in store for you?

By reading this whitepaper, you will understand:

  • Important considerations before setting up BizTalk Server 2016
  • Prerequisites for installing BizTalk Server 2016
  • Step by step process of installing BizTalk Server 2016 on Windows Server 2016
  • Best ways in which you can optimize your BizTalk Server 2016 environment
  • Hardware and Software requirements
  • Basic Configuration vs. Custom Configuration

Installing-Configure-BizTalk-Server-2016-Standalone-Machine

Contents
  • BizTalk Server Installation scenario
    • Assumptions and out of scope
  • Important considerations before set up the server.
    • Join the Local Administrators Group.
    • Change the Machine name.
    • Turn off Internet Explorer Enhanced Security Configuration (optional)
    • Disable User Account Control (optional).
    • Turn Windows Firewall off (optional).
    • Configure the Application Event Log.
    • Configure Microsoft Distributed Transaction Coordinator (MS DTC).
    • Customize Taskbar and Start Menu Properties (optional).
    • Set the default browser.
    • Install Critical Windows Updates.
  • Preparing and install prerequisites for BizTalk Server 2016.
    • Important considerations before set up the servers.
    • Enable Internet Information Services.
      • Running the BAM Portal in a 64-bit Environment.
    • Install Windows Identity Foundation (WIF) (optional).
    • Install and configure SMTP Server Feature (optional)
      • Verify Your Installation
    • Install Microsoft Office Excel 2016 (optional).
      • Installing and configuring Office 2016 Deployment Tool
      • Installing Microsoft Office Excel 2016
    • Install Visual Studio 2015 (optional).
      • Remove Microsoft SQL Server Express.
    • Install SQL Server 2016.
    • Configure SQL Server Database Mail feature.
  • Install and configure BizTalk Server 2016.
    • Install BizTalk Server 2016.
      • Verify Your Installation.
    • Configure BizTalk Server.
      • Pin BizTalk Server Administration to taskbar.
    • Configure SQL Server Network Configuration protocols.
    • Validate Mail account used by BizTalk to send BAM Alerts.
    • Install BizTalk Adapter Pack
      • Microsoft BizTalk Adapter Pack and Microsoft BizTalk Adapter Pack (x64).
      • Steps to install BizTalk Adapter Pack.
      • Add adapters to BizTalk Administration Console.
    • Install Critical Windows Updates and BizTalk Server Cumulative Update Package.
    • Configure BizTalk Server SQL Jobs.
      • How to configure Backup BizTalk Server (BizTalkMgmtDb).
      • How to configure DTA Purge and Archive (BizTalkDTADb).
      • MessageBox_Message_Cleanup_BizTalkMsgBoxDb.
  • Optimize the BizTalk Server 2016 environment
    • Deleting BizTalk backup files.
      • Implementing a custom sp_DeleteBackupHistory.
      • Implementing a Maintenance Plan to clean BizTalk Database backup’s files.
    • Pre-allocate space and define auto-growth settings for BizTalk Server databases.
    • Configure BizTalk Server Windows Services.
    • Install and configure BizTalk Health Monitor.
      • How to register BizTalk Health Monitor Snap-In.
      • How to integrate BHM Snap-In into BizTalk Admin Console
    • Configure BizTalk Jobs History (Microsoft SQL Server Agent job history log).
      • To resize the job history log based on raw size.
    • Managing and cleaning BizTalk Server MarkLog database tables.
    • Configure host and Host instances.
      • What’s is Host, Host Instances and Adapter Handlers?.
      • Best practices to Configuring Hosts and Host Instances.
      • How can I automate this task?.
    • Power Mode.
    • Consider setting the ‘text in row’ table option to boost BizTalk Server Performance
      • How to exploit the Text in Row table option in BizTalk Server
  • Appendix A: Hardware and Software Requirements
  • Appendix B: Redistributable CAB Files
  • Appendix C: Basic Configuration vs. Custom Configuration

 

Download the whitepaper for free here: Installing BizTalk Server 2016 in a Standalone Machine

Installing-Configure-BizTalk-Server-2016-Standalone-Machine-vertical

If you are interest to see other version check the following posts:

 

I would like to take this opportunity also to say thanks to Lex Hegt for reviewing this whitepaper.

Download the whitepaper for free here: Installing BizTalk Server 2016 in a Standalone Machine

In the sequence of my last two post (here and here) and following the same topic, in order to finalize it, let’s talk about the last option and see how we can accomplish the same goal but this type configuring the Send Handler for existing static Send Ports in your environment.

Well, the two previous post are, in my opinion, more critical than this one for se simple reason that the default BizTalk installation will had ports in your environment that needs to be configure if you want to configure BizTalk Host in a High Availability way, i.e., dedicate logical hosts to run specific areas of functionality such as receiving messages, sending messages, processing orchestrations or tracking data.

However, and although less critical, static send ports can also be a problem in some scenarios, for example:

  • If you install ESB Toolkit before configuring your hosts for each functionality, because during the ESB Toolkit installation it will also be created a static send port call “ALL.Exceptions” that connects with SQL “EsbExceptionDb” database. And this port will be configured with the default send handler (at that time) configured in your environment, that is by default the “BizTalkServerApplication”
  • but also if you reach to an existing environment, already containing several BizTalk Applications running, that is not configured according to best practices in terms of host and host instances (dedicate logical hosts for each functionality).

Once again, we need to do basically do the same steps described in my last two posts to accomplish the task of deleting “BizTalkServerApplication”, this time as a send handler of each adapter:

  • Manually reconfigure the Send handler for each the existing Static Send Port first, configuring them with the new or correct Send Handler;
  • and then manually delete the “BizTalkServerApplication” as a Send handler for each adapter;

You may have heard this before, but it never hurts, all of these tasks are time consuming, and a little boring to do after a while or if we need to do it several times;

So how can we automate tasks? and reuse them whenever necessary and at the same time saving significant time for other tasks?

Using PowerShell is a good option J. Windows PowerShell is a Windows command-line shell designed especially for system administrators and can be used by BizTalk administrators to help them in automating repetitive tasks or tasks that are time consuming to perform manually.

This is a simple script that allows you to configure the Send handler associated with all the existing Static Send Ports in your environment independently of the adapter that is configured:

$catalog = New-Object Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer
$catalog.ConnectionString = "SERVER=$bizTalkDbServer;DATABASE=$bizTalkDbName;Integrated Security=SSPI"

foreach($SendPort in $catalog.SendPorts)
{
    # For each receive location in your environment
    if($sendPort.IsDynamic -eq $False)
    {
        # Let's look for send handlers associated with Adapter configured in the send port
        foreach ($handler in $catalog.SendHandlers)
        {
            # if the Send Handler is associated with the Adapter configured in the send port
            if ($handler.TransportType.Name -eq $sendPort.PrimaryTransport.TransportType.Name)
            {
                # We will configured the port with the default send handler associated in each adapter in you system  
                # independently if it is "BizTalkServerApplication" or not.
                # Note: it's is recomended that you first configure the default send handlers for each adapter 
                #       and also not to use the "BizTalkServerApplication" (my personal recomendation)
                if($handler.IsDefault)
                { 
                    $sendPort.PrimaryTransport.SendHandler = $handler
                    break
                }
            }
        }
    }
}
$catalog.SaveChanges()

Prerequisites for this script: The host, host instances and Receive handlers needs to be already configured in your environment before you run the script;

THIS POWERSHELL IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND.

The full script can be found and download on Microsoft TechNet Gallery:
PowerShell to Configure the Default Send Handler for each static Send Port (3.0 KB)
Microsoft TechNet Gallery

Following the topic from my previous post, when we are configuring/optimizing a new environment, if some features are installed like EDI features or RosettaNet Accelerator, if we create different or dedicated host and host instances for each functionality, for example a host instance for receive, send, process (orchestrations), tracking and so on; of course then we need to associate them as a specific handler of each adapter (receive or send handler) and if we want to delete the “BizTalkServerApplication” as a receive handler from each adapter… we can’t!

This happens because, at least, both EDI and RosettaNet will create during the installation some Receive Ports:

  • BatchControlMessageRecvPort with a receive location BatchControlMessageRecvLoc using SQL Adapter
  • ResendReceivePort with a receive location ResendReceiveLocation using SQL Adapter
  • LOB_To_PrivateInitiator with a receive location LOB_To_PrivateInitiator using SQL Adapter
  • LOB_To_PrivateResponder with a receive location LOB_To_PrivateResponder using SQL Adapter

And all these ports, by default during the installation, are configured with the only existing Receive handler available at the time: “BizTalkServerApplication”.

To accomplish the task of deleting “BizTalkServerApplication” as a receive handler of each adapter, we need to do basically the same steps described in my last post:

  • Manually reconfigure the Receive handler for each the existing receive location first, configuring them with the new Receive Handler;
  • and then manually delete the “BizTalkServerApplication” as a Receive handler for each adapter;

This task can be more normal to happen on the first time we configure/optimize the environment – day one of the BizTalk Server – but can be more critical if you reach to an existing environment, already containing several BizTalk Applications running, that is not configured according to best practices in terms of host and host instances.

Once again, all of these tasks are time consuming, and to be fair… again…, they are a little boring to do after we know how to do it manually;

So how can we automate tasks? and reuse them whenever necessary and at the same time saving significant time for other tasks?

Using PowerShell is a good option J. Windows PowerShell is a Windows command-line shell designed especially for system administrators and can be used by BizTalk administrators to help them in automating repetitive tasks or tasks that are time consuming to perform manually.

This is a simple script that allows you to configure the receive handlers associated with all the existing Receive Ports in your environment that are using the SQL Adapter, but this can be easily changed to cover all the Receive Locations independently of the configured adapter:

$catalog = New-Object Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer
$catalog.ConnectionString = "SERVER=$bizTalkDbServer;DATABASE=$bizTalkDbName;Integrated Security=SSPI"

foreach($receivePort in $catalog.ReceivePorts)
{
    # For each receive location in your environment
    foreach($recLocation in $receivePort.ReceiveLocations)
    {
        # In this case I want only Receive location that are using SQL Adapter
        if($recLocation.ReceiveHandler.TransportType.Name -eq 'SQL')
        {
            # Let's look for receive handlers associated with SQL Adapter
            foreach ($handler in $catalog.ReceiveHandlers)
            {
                # if is a SQL Adapter Receive Handler
                if ($handler.TransportType.Name -eq "SQL")
                {
                    # And is not BizTalkServerApplication, then configure that as the handler of the receive location
                    # Note: that in this case we will configure as a Receive Handler of the Receive location, the first 
                    #       receive handler that we find that is not the "BizTalkServerApplication"
                    #       because the goal is to delete this handler
                    if($handler.Name -ne 'BizTalkServerApplication')
                    { 
                        $recLocation.ReceiveHandler = $handler
                        break
                    }
                }
            }
        }
    }
}
$catalog.SaveChanges()

Prerequisites for this script: The host, host instances and Receive handlers needs to be already configured in your environment before you run the script;

THIS POWERSHELL IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND.

The full script can be found and download on Microsoft TechNet Gallery:
PowerShell to Configure Receive Handlers from existing Receive locations (3.0 KB)
Microsoft TechNet Gallery

As happens almost every year on this day (my birthday), I always try to write a post for the BizTalk community… something like a gift/present to the community… today will be automate the task of configuring default Dynamic Send ports handlers using PowerShell.

Since BizTalk Server 2013 we have available a new feature: Configurable Dynamic Send Port Handler. Which means that, when we are creating a Dynamic Send Port, an adapter Send Handler can be configurable for every installed adapter, by default it uses the default send handler associated in each adapter. This Includes both One-Way and Solicit-Response Dynamic Ports.

Note that in previous BizTalk versions, a dynamic send port uses the adapter’s default host, and we cannot change this behavior.

However, this new features also brings us some setbacks, special for BizTalk Administrators, for example:

  • When we are installing a new environment, if we install the EDI features, this will add a dynamic port call “ResendPort” (don’t need to describe the propose of this port) and the default send handler for each adapter will be the “BizTalkServerApplication”;
    • If we create different or dedicated host and host instances for each functionality, for example a host instance for receive, send, process (orchestrations), tracking and so on; of course then we need to associate them as a specific handler of each adapter (receive or send handler) and if we want to delete the “BizTalkServerApplication” as a send handler for each adapter… we can’t, we first need to:
      • Manually reconfigure the default Dynamic Send port handlers for each dynamic port first, configuring them with the new default send handler;
      • and then manually delete the “BizTalkServerApplication” as a send handler for each adapter;
  • The same happens when we install a new adapter. By default, it assumes the default host in the group as the default send handler of the adapter and in consequence the default send handler associated with this adapter in the existing dynamic send ports. Which means that once again we need to manually reconfigure the send handler in all the existing dynamic send ports for this new adapter;
  • And so on;

All of these tasks are time consuming, and to be fair, they are a little boring to do after we know how to do it manually;

So how can we automate tasks? and reuse them whenever necessary and at the same time saving significant time for other tasks?

Using PowerShell is a good option. Windows PowerShell is a Windows command-line shell designed especially for system administrators and can be used by BizTalk administrators to help them in automating repetitive tasks or tasks that are time consuming to perform manually.

This is a simple script that allows you to configure the default send handlers associated with all the existing Dynamic Send ports in your environment:

[string] $sendHost32bits = "BizTalkServerSend32Host"
[string] $sendHost64bits = "BizTalkServerSendHost"

$catalog = New-Object Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer
$catalog.ConnectionString = "SERVER=$bizTalkDbServer;DATABASE=$bizTalkDbName;Integrated Security=SSPI"

foreach($sendPort in $catalog.SendPorts)
{
    if($sendPort.IsDynamic -eq' True')
    {
        # A Dynamic send port was found so now we need to configure the send handler as desired
        # 64 bits adapters
        # Changing the default send handlers of the dynamic port
        $sendPort.SetSendHandler("FILE", $sendHost64bits)
        $sendPort.SetSendHandler("HTTP", $sendHost64bits)
        $sendPort.SetSendHandler("MQSeries", $sendHost64bits)
        $sendPort.SetSendHandler("MSMQ", $sendHost64bits)
        $sendPort.SetSendHandler("SB-Messaging", $sendHost64bits)
        $sendPort.SetSendHandler("SFTP", $sendHost64bits)
        $sendPort.SetSendHandler("SOAP", $sendHost64bits)
        $sendPort.SetSendHandler("WCF-BasicHttp", $sendHost64bits)
        $sendPort.SetSendHandler("WCF-BasicHttpRelay", $sendHost64bits)
        $sendPort.SetSendHandler("WCF-Custom", $sendHost64bits)
        $sendPort.SetSendHandler("WCF-NetMsmq", $sendHost64bits)
        $sendPort.SetSendHandler("WCF-NetNamedPipe", $sendHost64bits)
        $sendPort.SetSendHandler("WCF-NetTcp", $sendHost64bits)
        $sendPort.SetSendHandler("WCF-NetTcpRelay", $sendHost64bits)
        $sendPort.SetSendHandler("WCF-SQL", $sendHost64bits)
        $sendPort.SetSendHandler("WCF-WebHttp", $sendHost64bits)
        $sendPort.SetSendHandler("WCF-WSHttp", $sendHost64bits)
        $sendPort.SetSendHandler("Windows SharePoint Services", $sendHost64bits)       

        # 32 bits adapters
        # SMTP Supports 64 bits but I want to run in 32 because of the MIME/SMIME Encoder
        $sendPort.SetSendHandler("FTP", $sendHost32bits)
        $sendPort.SetSendHandler("SMTP", $sendHost32bits)
        $sendPort.SetSendHandler("SQL", $sendHost32bits)
    }
}

$catalog.SaveChanges() 

Prerequisites for this script: The host, host instances and send handlers needs to be already configured in your environment before you run the script;

THIS POWERSHELL IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND.

The full script can be found and download on Microsoft TechNet Gallery:
PowerShell to configure Default Dynamic Send Port Handlers for each Adapter (3.0 KB)
Microsoft TechNet Gallery

Finally, something that many community members have been requesting me to publish is here! I already made this manual several months ago, however, for several reasons (speaking engagements, publishing other content and so on) I have been delaying its publication. But I have offered this same guide to all my customers.

There are many things to consider when planning this type of installation, often the network infrastructure already exists and BizTalk Server must coexist with other network applications.

Installing BizTalk Server 2013 R2 in a Basic Multi-Computer Environment (User Guide) is a 145 pages detailed installation document that explains how to install, configure and optimize Microsoft BizTalk Server 2013 R2 on a basic multi-computer running Windows Server 2012 R2. This information will help you to plan the installation and configuration of BizTalk Server 2013 R2, applications and components on which it depends.

Contents                                      
  1. BizTalk Server Installation scenario.
  2. The need for a Domain Controller – Windows Groups and Service Accounts.
    1. Create Domain Groups and Users.
    2. Planning the use of a new Organizational Unit.
    3. Windows Groups Used In BizTalk Server.
    4. IIS_WPG and IIS_IUSRS Group.
    5. User and Service Accounts Used In BizTalk Server.
    6. Summary of users and Groups Affiliation.
    7. SQL Server Service Accounts.
    8. References.
  3. Preparing Computers for Installation – Important considerations before set up the servers.
    1. Change the Machine name.
    2. Join the Local Administrators Group.
    3. The user running the BizTalk Server configuration must belong…
    4. Install Critical Windows Updates.
    5. Disable IPv6 (optional).
    6. Turn off Internet Explorer Enhanced Security Configuration (optional).
    7. Disable User Account Control (optional).
    8. Turn Windows Firewall off (optional).
    9. Configure Microsoft Distributed Transaction Coordinator (MS DTC).
    10. COM+ Network Access considerations.
  4. Preparing and Install SQL Server 2014 machine.
    1. Important considerations before set up the servers.
    2. Install SQL Server 2014.
    3. Configure SQL Server Database Mail feature.
    4. Install Service Pack 1 for Microsoft SQL Server 2014.
    5. Configure SQL Server for Remote Connections.
    6. Configured SQL Server protocols – Disable the Shared Memory Protocol, Enable TCP/IP and Named Pipes.
    7. Configure SQL Server Database Engine to listen on a specific TCP Port (optional).
    8. Configure SQL Analysis Server to listen on a specific TCP Port (optional).
    9. Configuring Microsoft Distributed Transaction Coordinator (DTC) to work through a firewall or network address translation firewalls (optional).
    10. List of ports between BizTalk Server and SQL Server (optional).
    11. Configure Firewall on SQL Server machine (optional).
      1. Inbound Rules.
      2. Outbound Rules.
  5. Preparing and install prerequisites on BizTalk Server 2013 R2 machine.
    1. Important considerations before set up the servers.
    2. Enable Internet Information Services.
    3. Running the BAM Portal in a 64-bit Environment.
    4. Install Windows Identity Foundation (WIF) (optional).
    5. Install Microsoft Office Excel 2013 (optional).
    6. Install Visual Studio 2013 (optional).
    7. Remove Microsoft SQL Server Express.
    8. SQL Server Considerations.
    9. Install SQL Server 2014 Client Tools.
    10. Create SQL Alias to communicate with remote SQL Server using Non-Standard Port (optional).
    11. List of ports between SQL Server and BizTalk Server (optional).
    12. Configure Firewall on BizTalk Server machine.
      1. Inbound Rules.
      2. Outbound Rules.
  6. Testing environment connectivity’s.
    1. TCPView.
    2. DTCPing.
    3. DTCTester.
    4. SQL Server 2014 Client Tools.
  7. Install and configure BizTalk Server 2013 R2 machine.
    1. Install BizTalk Server 2013 R2.
      1. Verify Your Installation.
    2. Configure BizTalk Server.
      1. Pin BizTalk Server Administration to taskbar.
    3. Validate Mail account used by BizTalk to send BAM Alerts.
    4. Install BizTalk Adapter Pack.
      1. Microsoft BizTalk Adapter Pack and Microsoft BizTalk Adapter Pack (x64).
      2. Steps to install BizTalk Adapter Pack.
      3. Add adapters to BizTalk Administration Console.
    5. Install Critical Windows Updates and BizTalk Server Cumulative Update Package.
    6. Configure BizTalk Server SQL Jobs.
      1. How to configure Backup BizTalk Server (BizTalkMgmtDb).
      2. How to configure DTA Purge and Archive (BizTalkDTADb).
      3. MessageBox_Message_Cleanup_BizTalkMsgBoxDb.
  8. Optimize the BizTalk Server 2013 R2 environment
    1. Deleting BizTalk backup files.
      1. Implementing a custom sp_DeleteBackupHistory.
      2. Implementing a Maintenance Plan to clean BizTalk Database backup’s files.
    2. Pre-allocate space and define auto-growth settings for BizTalk Server databases. 112
    3. Configure BizTalk Server Windows Services.
    4. Install and configure BizTalk Health Monitor.
      1. How to register BizTalk Health Monitor Snap-In.
      2. How to integrate BHM Snap-In into BizTalk Admin Console
    5. Install SSO Configuration Application MMC Snap-In
    6. Configure BizTalk Jobs History (Microsoft SQL Server Agent job history log).
      1. To resize the job history log based on raw size.
    7. Force Full Backup BizTalk Server (BizTalkMgmtDb) job.
    8. Managing and cleaning BizTalk Server MarkLog database tables.
    9. Configure host and Host instances.
      1. What’s is Host, Host Instances and Adapter Handlers?.
      2. Best practices to Configuring Hosts and Host Instances.
      3. How can I automate this task?.
    10. Power Mode.
    11. Consider setting the ‘text in row’ table option to boost BizTalk Server Performance.
      1. How to exploit the Text in Row table option in BizTalk Server.
    12. General network TCP settings that can impact BizTalk Server
      1. How to Disable the Scalable Networking Pack (SNP) features
      2. How to Disable Privilege Attribute Certificate (PAC)
      3. How to Check and if necessary increase the ephemeral ports and reduce the TCP re-use timeout setting

download-whitepaper

If you are interest to see other version check the following posts:

There is a lot of inconsistent and incorrect information about the BizTalk SAP Adapter (or in this case WCF-SAP Adapter) installation process and how it works – It is normal to see comments that the adapter only runs on 32-bit, or to see indications that we have to copy DLLs to two different places (System32 and SysWOW64) but which ones?

I hope with this step-by-step installation guide to clarify a bit and document a little better this task.

So, one of the key question that we need to clarify is: Does the WCF-SAP adapter runs under 64-bit Host Instance?

And the correct response to this question is: Yes, it does! The SAP adapter supports both the 32-bit and the 64-bit versions of the SAP RFC SDK, so it can run under 32 or 64-bit Host Instances.

The second important question that we need to clarify is that: Documentation specifies that we need to add the 32-bit version of the client DLLs for the SAP adapter to C:\Windows\SysWow64 folder and the 64-bit version of the DLLs must be added to C:\Windows\System32 folder, but what this means? Do need to add the same DLL in two different folders?

Indeed, the documentation is correct and we need to add both 32 and 64-bit to different folder in our system… but this are different DLL and no the same ones – so if you only have one SDK resource, for example the SAP RFC SDK 32-bit, you just need to add this into one of the folders, copy for both places doesn’t make any difference because the adapter will only run in this case under a 32-bit Host Instance.

For each SAP Client version (6.4, 7.0 and so on) there are two SAP RFC SDK one for 32-bit and one for 64-bit and you need to download and install both… just like the BizTalk Server Adapter Pack.

There are SAP UNICODE and NON-UNICODE, so witch version of the SAP RFC SDK should I download?

The SAP adapter requires Unicode version of the RFC SDK irrespective of whether the SAP system is Unicode or non-Unicode.

Official documentation states that only the following SAP server versions are supported:

  • SAP 7.2, SAP 7.0, SAP ERP 6.0 with EHP 4.0, SAP ECC 6.0 Unicode

However earlier version, which were mentioned in previous versions of the documentation, are also supported:

  • SAP ECC 5.0 Non-Unicode, SAP ECC 5.0 Unicode, SAP R/3 4.7 Non-Unicode, SAP R/3 4.7 Unicode, SAP R/3 4.6c Non-Unicode, SAP ERP 6.0 with EHP 4.0

Also official documentation states that the only supported client version is the SAP RFC SDK 7.2 UNICODE – I always recommend to use the latest version… however, once again, as previous versions of the documentation mentioned, these client versions are also supported:

  • SAP client 6.4 version: SAP RFC SDK 6.40 UNICODE
  • SAP client 7.0 version: SAP RFC SDK 7.00 UNICODE
  • SAP client 7.1 version: SAP RFC SDK 7.10 UNICODE
  • SAP client 7.11 version: SAP RFC SDK 7.11 UNICODE

I’m not a SAP expert but I think that all depends if the SAP client version is supported in your SAP System version. For example, in one BizTalk Server 2013 R2 environment I have the SAP client 7.2 version installed and in another one, a BizTalk Server 2013, I have the 7.0 and both are working fine.

And finally: Can I install only the 64-bit version?

No, you can’t and for the exact same reason that we need to install both version of the BizTalk Server Adapter Pack: Visual Studio and BizTalk Administration console are 32-bit applications, so in order to configure the adapter in runtime (Receive Locations or Send Ports that will be using the SAP Adapter) or to use it to generate the schemas in the development phase you always need to have installed the 32-bit version of the SAP RFC SDK.

The 64-bit version of the SAP RFC SDK is optional, but, if you have a 64-bit BizTalk environment and you want to run it under 64-bit Host Instance, then you need to also install both versions of the SAP RFC SDK.

Download Prerequisites

As happen with other LOB adapters (like Oracle for example), installing the BizTalk Adapter pack is not enough and you will need the addition resources that will be specify bellow.

Download SAP Resources from SAP Service Marketplace

You need to obtain a few resources from the SAP Service Marketplace in order to properly install WCF-SAP adapter:

  • SAP RFC SDK <version> UNICODE 32-bit
  • SAP RFC SDK <version> UNICODE 64-bit
  • R3DLLINST.zip containing Microsoft run-time DLLs
  • SAPCAR – SAPCAR is a compress utility (similar to WinZip, tar and so on), that is used by SAP to compress and decompress nearly all delivered files

Unfortunately, SAP Service Marketplace is restricted, so if you like to benefit from the content and services offered in the different portals of the SAP Service Marketplace, you need to request your personal User ID otherwise you need to ask your client or your SAP team to give you this resources.

In additional to the links above you may also find useful to give these two SAP notes to your client or SAP team:

Unlike R3DLLINST.zip, that is a unique resource, on the SAP Service Marketplace portal SAP RFC SDK page you will find several resources and we must understand exactly what we need, in this case for example purposes, I’m using the SAP RFC SDK 7.20 page:

SAP-Service-Marketplace-portal-SAP-RFC-SDK-7.20

Depending in the SAP client version you want to install this may change a little, but it is practically the same for the other versions, as you can see in the case of SAP RFC SDK 7.00 page

SAP-Service-Marketplace-portal-SAP-RFC-SDK

What you need to download is the:

  • Windows Server on IA32 32bit” –> this is the SAP RFC SDK 7.00 UNICODE 32-bit
  • And the “Windows on x64bit” –> SAP RFC SDK 7.00 UNICODE 64-bit

You also need to download SAPCAR to extract (unzip) the SAP resources, I think you may found this resource at service.sap.com/patches under:

  • Download, Support Packages and Patches, Entry by Application Group, Additional Components and then SAPCAR

SAP-Service-Marketplace-portal-SAPCAR

Extract SAP Resources

Once we have downloaded all this SAP resources, we need to use the SAPCAR to extract the SAP resources, in this case (SAP RFC SDK 7.20):

  • “RFC_12-10009744.SAR” is the 64-bit SDK that we want to extract to “rfcsdk 64” folder
  • “RFC_12-100097446.SAR” is the 32-bit SDK that we want to extract to “rfcsdk 32” folder

BizTalk-Server-SAP-Software-resources

To accomplished that we need to:

  • Open a command line prompt
  • Change our directory to the location where we saved the “SAPCAR.exe” and execute the following command to extract the the SAR archive:
    • SAPCAR.exe -xfv “RFC_12-10009744.SAR”
      • This will create a folder call “rfcsdk”, rename that to “rfcsdk 64”

Extract-SAR-archive-with-SAPCAR

    • SAPCAR.exe -xfv “RFC_12-10009746.SAR”
      • This will create a folder call “rfcsdk”, rename that to “rfcsdk 32”

The final step regarding to SAP Resource is to unzip the “r3dllinst.zip” file using for example an open source Windows utility for manipulating archives like 7-Zip.

Download Microsoft Visual C++ 2005 SP1 Redistributable Package

Microsoft Visual C++ run-time DLLs, again both 32 and 64-bit are required for SAP 7.11 client or higher. This resources are available from download in the following links:

download-Microsoft-Visual-C  _2005_SP1_Redistributable_Package

download-Microsoft-Visual-C  _2005_SP1_Redistributable_Package-files

Step-by-Step WCF-SAP Adapter installation guide

The first thing you need to make sure that you have installed already is both 32 and 64-bit versions of the Microsoft BizTalk Adapter Pack.

  • The Microsoft BizTalk Adapter Pack contains adapters that enable enterprise applications and databases to interface with each other by implementing a common adapter framework. Similar to programming to Web services, adapters enable clients to program to different enterprise applications. Technically, adapters are a binding to Windows Communication Framework (WCF). The BizTalk Adapter Pack consists of the following adapters:
    • Microsoft BizTalk Adapter for Oracle Database (Oracle Database adapter).
    • Microsoft BizTalk Adapter for Oracle E-Business Suite (Oracle E-Business adapter).
    • Microsoft BizTalk Adapter for mySAP Business Suite (SAP adapter). This also includes the .NET Framework Data Provider for mySAP Business Suite (Data Provider for SAP).
    • Microsoft BizTalk Adapter for Siebel eBusiness Applications (Siebel adapter). This also includes the .NET Framework Data Provider for Siebel eBusiness Applications (Data Provider for Siebel).
    • Microsoft BizTalk Adapter for SQL Server (SQL adapter).
  • Find more about the BizTalk Adapter Pack installation process in the following articles:

Notice that, at this point, if you try to create a receive or send port using the WCF-SAP adapter you will get the following error:

Exception has been thrown by the target of an invocation. (mscorlib)
Could not load file or assembly ‘Microsoft.Adapters.SAP.SAPGInvoker.dll’ or one of its dependencies. The specified module could not be found. (Microsoft.Adapters.SAP)

Could-not-load-file-assembly-Microsoft.Adapters.SAP.SAPGInvoker.dll

This is because we need the SAP resources required to run the adapter are not install (or are i installed incorrectly).

So, now that we have install the Microsoft BizTalk Adapter Pack, we need to install the SAP Resources that we previous download in our BizTalk Server machine:

  • Open the “rfcsdk 64” folder containing the SAP RFC SDK 7.20 UNICODE 64-bit and access to the lib folder
    • “C:\SAP Resources\rfcsdk 64\lib”

SAP-rfcsdk-7.2-64-bit-lib-Resources

  • Install the SAP RFC SDK 64-bit DLLs by coping (or drag) them to the “System32” folder in your system “Windows” folder
    • “C:\Windows\System32”:

SAP-rfcsdk-7.2-64-bit-lib-Resources-Installation

  • And now we need to do the a similar process to the Open the SAP RFC SDK 7.20 UNICODE 32-bit
  • For that you need to open the “rfcsdk 32” folder containing the SAP RFC SDK 7.20 UNICODE 32-bit and access to the lib folder
    • “C:\SAP Resources\rfcsdk 32\lib”

SAP-rfcsdk-7.2-32-bit-lib-Resources

  • Install the SAP RFC SDK 32-bit DLLs by coping (or drag) them to the “SysWOW64” folder in your system “Windows” folder
    • “C:\Windows\SysWOW64”:

SAP-rfcsdk-7.2-32-bit-lib-Resources-Installation

  • Open the “r3dllinst\ ntpatch” folder containing the content of “r3dllinst.zip” file, ,and we need to execute the “R3DLLINS.EXE” tool, in order to install the SAP R/3 DLLs (Microsoft run-time DLLs):
    • msvcr71.dll
    • msvcp71.dll
    • mfc71.dll
    • mfc71u.dll

install-SAP-r3dllinst-R3DLLINS

  • The tool specifies that the DLLs were installed under “C:\Windows\System32” folder, however because I’m using a 64-bit environment instead they were installed in “c:\Windows\SysWOW64” folder

install-SAP-r3dllinst-R3DLLINS-SysWOW64

    • You should check if DLL are present in “C:\Windows\System32”, if they are not I advise you to:
      • Leave them in the ” c:\Windows\SysWOW64” folder
      • And, just to be sure, copy the same four DLLs to “C:\Windows\System32” folder

install-SAP-r3dllinst-R3DLLINS-windows-folder

  • And finally we also need to installed Microsoft Visual C++ 2005 SP1 Redistributable Package – 32-bit and 64-bit – containing the Visual C++ run-time DLLs required for SAP 7.20 (or 7.11) client:
    • Install the Microsoft Visual C++ 2005 SP1 Redistributable Package (x86) – 32-bit – by executing the “Vcredist_x86.exe” file that we previous download
      • On the Microsoft Visual C++ 2005 SP1 Redistributable Package window, click “Yes”

Microsoft-Visual-C  -2005-SP1-Redistributable-Package-x86

    • Do the same steps to install the Microsoft Visual C++ 2005 SP1 Redistributable Package (x64) – 64-bit – by executing the “Vcredist_x64.exe” file that we previous download
      • On the Microsoft Visual C++ 2005 SP1 Redistributable Package window, click “Yes”
Add adapters to BizTalk Administration Console

As it happens with all adapters that we installed on our BizTalk Servers environment, before we can begin to use them we need to register or add the adapters. So in the next step it will be describing how can we add the enterprise adapters, or any other custom adapter, on the BizTalk Administration Console. To accomplish that we need to:

  • Open BizTalk Administration Console by pressing the “Windows key” to switch to the Start screen, type “BizTalk Server Administration” or “BizTalk”, click “BizTalk Server Administration” option from the Search menu
  • In the console left tree, expand “BizTalk Server Administration –> BizTalk Group –> Platform Settings” and then “Adapters”
  • Right-click on “Adapters” and add a new adapter by selecting the option “New –> Adapter”

BizTalk-Administration-Console-Register-WCF-SAP-adapter-add-new

  • In the “Adapter Properties” window
    • In the Name box, type a descriptive name for this adapter.
      • WCF-SAP
    • In the Adapter combo box, select the adapter from the drop-down that you want to add.
      • WCF-SAP
    • In the Description box, type a description for the adapter (this is optional).
      • The WCF-SAP adapter provides a rich metadata layer on top of SAP that enables the consumption of RFCs and enables seamless BAPI and IDOC exchange in an interoperable manner. The SAP adapter exposes the SAP system as a WCF service to client applications.

BizTalk-Administration-Console-Register-WCF-SAP-adapter

    • Click “OK” to complete the process of adding the adapter.
      • We will receive a warning message saying that we need to restart the Host Instances
      • Click “Ok”, we will deal with it in a moment

BizTalk-Administration-Console-Register-WCF-SAP-adapter-warning-message

  • Now we need to create other send and receive adapter handlers for the WCF-SAP Adapter, to accomplished that we need to:
  • Expanded the adapter list, right-click the “WCF-SAP” adapter, point to New, and then:
    • click “Send Handler to create a send handler”
    • Or click “Receive Handler” to create a receive handler.

BizTalk-Administration-Console-Register-WCF-SAP-adapter-add-receive-send-handlers

Notice: that by default the adapter already have one Receive and one Send handler that are associated to the default Host Instance – normally the “BizTalkServerApplication” Host Instance

  • Add two send handler using Dedicated Send Hosts
    • One running under 32-bit: BizTalkServerSend32Host
    • One running under 64-bit: BizTalkServerSendHost
  • Add two receive handler using Dedicated Receive Hosts
    • One running under 32-bit: BizTalkServerSend32Host
    • One running under 64-bit: BizTalkServerSendHost
  • Delete the default handlers that use the “BizTalkServerApplication” Host (in my case it was “BizTalkServerApplication64Host”)

BizTalk-Administration-Console-Register-WCF-SAP-adapter-handler-configuration

Note: Now more about Create and Configure BizTalk Server Host and Host Instances in my TechNet Wiki article: BizTalk Server Best Practices: Create and Configure BizTalk Server Host and Host Instances

  • Finally we just need to restart our BizTalk Server Host Instances, for that you need to:
    • Expand the BizTalk group, click “Platform Settings”, and then click “Host Instances”.
    • In the details pane, right-click the host instance you want to start, and then click “Start”.

BizTalk-Administration-Console-restart-host-instances-final-step

Validate if the WCF-SAP adapter is properly installed

To do a preliminary test you to your WCF-SAP Adapter installation you can create a new receive port:

  • Right-click “Receive Ports”, point to “New”, and click “One-way Receive Port”

SAP-validation-add-new-receive-port

  • Just leave the default name and click on the “Receive Locations” tab and then click “New”.

SAP-validation-add-new-receive-location

  • In the Receive Location Properties dialog box, do the following:
    • From the Type drop-down list, select the “WCF-SAP” adapter you added earlier, and then click “Configure”.

SAP-validation-add-new-receive-port-configure-receive-location

If you were able to access the WCF-SAP Transport Properties window and the URI SAP configuration windows, this is half way thru and a good indication that the adapter is properly configured in your environment

WCF-SAP-Transport Properties-adn-URI-Windows

Of course now you need to actually test it against your SAP environment to see if you actually can receive or send messages from or to SAP System.

This part of the article will focus on the installation of additional useful tools to help you develop your BizTalk Server projects. The goal here is not to address all the tools available instead I will address only the most important ones that may have direct impact on the efficiency of your developments, because there are a number of tools that can aid you as BizTalk developer, which you can find on Codeplex or Microsoft Download Center, that are not offered out of the box by BizTalk Server like WCF Publishing Wizard and so on.

Install BizTalk NoS Addin for Visual Studio 2013

Although the current available version for download at Visual Studio Gallery has not been developed and not be “officially” supported for Visual Studio 2013/BizTalk Server 2013 R2 it can be installed and used without problems in this new environment conjugation: Visual Studio 2013 and BizTalk Server 2013 R2 with a small workaround.

What is BTSG NoS Addin purpose?

The purpose of BTSG NoS addin is to help all BizTalk Developer, why not, all BizTalk Administrator too in a lot of different situations, by improving the developer experience and why not reduce the development time in new or existent BizTalk projects.

It will provide several functionalities like quick search inside artifact, fast register/unregister in GAC, find critical, internal or external dependencies… and many fore functionalities like JackHammering, which will compare your VS artifact with the artifact deployed in BizTalk environment, you can also extract the artifact (Orchestration, map, schema and so on) from BizTalk environment and put it in the VS solution or even test your pipeline in VS simply… several features that are usefully in our day by day work and a time saver in a lot of situations.

How can I install BTSG NoS Addin for Visual Studio 2013

Because the current version of the Addin in not officially supported for Visual Studio 2013, you cannot install it through “Extensions and Updates” option from Visual Studio, instead you need to:

You can install BTSG NoS Addin directly from Visual Studio “Extensions and Updates” option. For that you must:

  • Download the BizTalk NoS Addin from Visual Studio Gallery: BizTalk NoS Addin
  • Execute “BTSGSetup.exe” file with administration writes by, right-click on the file and select “Run as administrator” option.

160-BizTalk-Server-2013-R2-BizTalk-NoS-Addin-Install

  • On the Welcome to the BTSG NoS Addin Installer Setup page, click “Next” to continue

160-BizTalk-Server-2013-R2-BizTalk-NoS-Addin

  • On the End-User License Agreement page, accept the terms by selecting the “I accept the terms of this License Agreement” option and click “Next” to continue.

161-BizTalk-Server-2013-R2-BizTalk-NoS-Addin

  • On the Destination Folder page, set the destination folder and click “Next” to continue

162-BizTalk-Server-2013-R2-BizTalk-NoS-Addin

  • On the Ready to install BTSG NoS Addin page, click “Install” to start the installation process.

163-BizTalk-Server-2013-R2-BizTalk-NoS-Addin

  • On the Completed the BTSG NoS Addin Installer Setup page, click “Finish” to complete the installation of the Addin.

164-BizTalk-Server-2013-R2-BizTalk-NoS-Addin

Add-In Registration for Visual Studio 2013 (Workaround)

Visual Studio add-ins are deprecated in Visual Studio 2013. You should upgrade your add-ins to VSPackage extensions. For BizTalk NoS Addin to work in Visual Studio 2013 we need to implement the following workaround:

  • When Visual Studio starts, it looks in the .addin file location (\Documents\Visual Studio 2013\Addins\) for any available .addin files
    • For example: C:\Users\Administrator\Documents\Visual Studio 2013
  • Because BizTalk NoS Addin is meant to work with Visual Studio 2012 you should go to
    • For example: C:\Users\Administrator\Documents\Visual Studio 2012
    • You will find in this location an “Addins” folder containing “BTSG NoS” addin file

165-BizTalk-Server-2013-R2-BizTalk-NoS-Addin-Visual-Studio-folder

  • Copy the “Addins” folder to Visual Studio 2013 .addin file location
    • For example: C:\Users\Administrator\Documents\Visual Studio 2013
  • Go to “Addins” folder:
    • For example: C:\Users\Administrator\Documents\Visual Studio 2013\Addins
    • And edit the file ADDIN File.AddIn in notepad and change the <HostApplication> element with the following data:
<HostApplication>
   <Name>Microsoft Visual Studio</Name>
   <Version>12.0</Version>
</HostApplication>
  • Save and close the file.
To load BTSG NoS Addin into Visual Studio 2013
  • Open a BizTalk Server Visual Studio Project and on the Tools menu, click Add-In Manager.

165-BizTalk-Server-2013-R2-BizTalk-NoS-Addin

  • In the Add-in Manager window, select the add-in from the Available Add-ins column list and then click “OK”.

166-BizTalk-Server-2013-R2-BizTalk-NoS-Addin

Back to your BizTalk project, right click in your BizTalk solution or in one of your BizTalk artifacts and you can see the new options provided by BTSG NoS Addin:

167-BizTalk-Server-2013-R2-BizTalk-NoS-Addin

You can find all the documentation about this addin in:

Or in my posts:

 

Install BizTalk Server Pipeline Component Wizard

The Pipeline Component Wizard is intended to ease to development of pipeline components used within a BizTalk Server environment. Supports both C# and VB.NET. The following resources can be used to download the tool, find guidance in usage and background information:

 

Install BizTalk Server Functoids Project Wizard

BizTalk MapperExtensions Functoid Wizard is a Custom Functoid Project Wizard for Visual Studio 2010. It allows you to create new Functoids project for BizTalk Server 2010 without having to create manually the project. Supports both C# and VB.NET.

The following resources can be used to download the tool, find guidance in usage and background information:

  • Available soon
Related links

This next posts will focus on optimizing some BizTalk Server 2013 R2 configurations. The following recommendations can be used to increase BizTalk Server performance or just to make the platform more resilient to failures. The optimizations listed in this topic are applied after BizTalk Server has been installed and configured.

Configure host and Host instances

One of the task that we need to do in all our new BizTalk environment over and over again is creating and configuring the Host, Host Instances and of course the adapter handlers.

BizTalk Server provides great flexibility for addressing high availability, because you can strategically dedicate logical hosts to run specific areas of functionality such as receiving messages, sending messages or processing orchestrations.
By default the BizTalk configuration will create two BizTalk Host and Host Instances:

  • BizTalkServerApplication: This is the default Host and Host Instance created during configuration that will do all the work on the BizTalk Server, i.e. is the default send and receive handler for all installed adapters (other than HTTP, WCF (BasicHttp, CustomIsolated, WebHttp and WSHttp) and SOAP Receive Handlers), and is also used for processing orchestration and tracking.

BizTalk-Server-2013-R2-BizTalkServerApplication-Host

  • BizTalkServerIsolatedHost: The logical container for HTTP, WCF (BasicHttp, CustomIsolated, WebHttp and WSHttp) and SOAP Receive Handlers.

BizTalk-Server-2013-R2-BizTalkServerIsolatedHost-Host

Although a single BizTalk Host can contain items that receive, send, and process messages, it is considered a best practice to create different hosts for each function to create security boundaries and for easier management and scalability. In particular, we recommend that you use different hosts for processing and for receive/send operations, and that you separate trusted and non-trusted items.

As the official documentation specify, in addition to the high availability aspects of the host instance configuration, you should separate sending, receiving, processing, and tracking functionality into multiple hosts. This provides flexibility when configuring the workload in your BizTalk group and is the primary means of distributing processing across a BizTalk group.

This also allows you to stop one host without affecting other hosts. For example, you may want to stop sending messages to let them queue up in the MessageBox database, while still allowing the inbound receiving of messages to occur.

Separating host instances by functionality also provides some of the following benefits:

  • Each host instance has its own set of resources such as memory, handles, and threads in the .NET thread pool.
  • Multiple BizTalk Hosts will also reduce contention on the MessageBox database host queue tables since each host is assigned its own work queue tables in the MessageBox database.
  • Throttling is implemented in BizTalk Server at the host level. This allows you to set different throttling characteristics for each host.
  • Security is implemented at the host level; each host runs under a discrete Windows identity.

However this also may bring some potential drawbacks if too many host instances are created because each host instance is a Windows service (BTSNTSvc.exe or BTSNTSvc64.exe), which generates additional load against the MessageBox database and consumes computer resources (such as CPU, memory, threads), so you need to be careful.

The following figure will provide you with a general overview of the relationship between servers, hosts and host instances, however is not intended to be the best practices. This architecture will depend from many factors and will change from client to client:

BizTalk-Server-2013-R2-Host-and-Host-Instances

Normally we read that we need to create at least 4 host instances:

  • Sending
  • Receiving
  • Processing
  • And tracking

but that’s not absolutely true because, at least since BizTalk Server is supported in 64 bits, we typically use 64-bits versions and in this case we also need to create at least one Host Instance that will run on 32-bits because FTP adapter, SQL adapter, POP3 adapter and MIME Decoder on 64-bit host instances is not supported by the product (http://technet.microsoft.com/en-us/library/aa560166.aspx)

We can define that one of the best practices for hosts and host instances is the following:

  • BizTalkServerTrackingHost: A BizTalk Host that hosts tracking is responsible for moving the DTA and BAM tracking data from the MessageBox database to the BizTalk Tracking (DTA) and BAM Primary Import databases.
  • BizTalkServerReceiveHost: This host will be responsible for processing messages after they are picked up in a receive location.
  • BizTalkServerReceive32Host: has the same goal as the previous however this must have the “32-bits only” option select so that we can run the 23-bits adapters.
  • BizTalkServerSendHost: This host will be responsible for processing messages before they are sent out to the send port.
  • BizTalkServerSend32Host: has the same goal as the previous however this must have the “32-bits only” option select so that we can run the 32-bits adapters.
  • BizTalkServerApplication: This host will be responsible for process messages based on the instructions in orchestrations that need to run in 32-bits.
  • BizTalkServerApplication64Host:This host will be responsible for process messages based on the instructions in all or most common orchestrations.

Note: You can create other Application Host if you want to separate process base in some application logic.

You can read more about this topic in more details in my previous post: PowerShell to Configure BizTalk Server Host and Host Instances according to some of the Best Practices or in TechNet Wiki: BizTalk Server Best Practices: Create and Configure BizTalk Server Host and Host Instances.

You can find a simple script to configure Host, Host Instance and Adapter Handlers described earlier in this post optimized for BizTalk Server 2013 R2 (and also 2013) in TechNet Gallery:

Power Mode

The different performance states are dynamically managed by Windows in conjunction with hardware and platform firmware to respond to varying workload requirements. The 3 default power plans exposed by Windows provide varying tradeoffs of performance vs. power consumption. For example, if the High Performance power plan is selected, Windows places the system in the highest performance state and disables the dynamic scaling of performance in response to varying workload levels. Therefore, special care should be taken before setting the power plan to High Performance as this can increase power consumption unnecessarily when the system is underutilized.

In some cases you may experience degraded overall performance on a machine when running with the default (Balanced) power plan. The issue may occur irrespective of platform and may be exhibited on both native and virtual environments. The degraded performance may increase the average response time for some tasks and cause performance issues with CPU-intensive applications

To change a power plan:

  • Press the “Windows key” to switch to the Start screen and type “Power Options” and click in “Power Options” option from the Search menu.

Windows-Server-2012-R2-Power-Options-Menu

  • From the power plan page, choose the High Performance option

Windows-Server-2012-R2-Power-Options-High-Performance

  • Close the Power Option window.

 

Consider setting the ‘text in row’ table option to boost BizTalk Server Performance

SQL Server provides a table option called text in row to declare that the contents of the fields of type text, ntext, or image data whose dimensions are smaller than those of a data page (8Kb) must be stored in a data row. By setting this option on BizTalkMsgBoxDb tables (Parts table, Spool table and DynamicStateInfo Tables), you can increase message throughput when working with small messages which have a small context and orchestrations that have a small persistence size. This makes reading and writing the in-row strings about as fast as reading or writing limited size varchar, nvarchar, or varbinary strings. Similarly, when the values are stored off-row, the Database Engine incurs an additional page read or write.

How to exploit the Text in Row table option in BizTalk Server

The following section explains how and when applying the text in row table option to boost BizTalk performance.

  • Parts Table: When the message size is smaller than the dimensions of a data page that are of 8kb, applying the text in row table option on the Parts table can lead to BizTalk Server performance improvement.
  • Spool Table: When the average size of the message context is less than 8 kb, enabling the text in row table option on the Spool table helps you reduce the number of accesses when reading messages from the MessageBox along with their context. To apply this option to the Spool table, you must eliminate unnecessary context properties and distinguished fields to reduce the size of the message context lower than 8 Kb.
  • DynamicStateInfo Tables: These tables, one for each host, contain a field of type image called imgData that contains binary-serialized orchestration state when they encounter a persistence point during their execution. When the internal state of orchestrations within a host HostA is so small that its size once serialized is less than 8 kb, the text in row technique can successfully be applied to the DynamicStateInfo_HostA table. Therefore we recommend that you keep the internal state of orchestrations as small as possible. This technique can significantly reduce the time that is spent by the XLANG Engine to serialize, persist, de-serialize and restore the internal state of an orchestration in case of persistence point.

See more about this topic in the following resources:

You can use the following settings sample that in your environment:

  • EXEC sp_tableoption N’Spool’, ‘text in row’, ‘6000’
  • EXEC sp_tableoption N’Parts’, ‘text in row’, ‘6000’
Related links

This next posts will focus on optimizing some BizTalk Server 2013 R2 configurations. The following recommendations can be used to increase BizTalk Server performance or just to make the platform more resilient to failures. The optimizations listed in this topic are applied after BizTalk Server has been installed and configured.

Install SSO Configuration Application MMC Snap-In

BizTalk Server leverages the Enterprise Single Sign-On (SSO) capabilities for securely storing critical information such as secure configuration properties (for example, the proxy user ID, and proxy password) for the BizTalk adapters. Therefore, BizTalk Server requires SSO to work properly. BizTalk Server automatically installs SSO on every computer where you install the BizTalk Server runtime.

But it also can keep your own application configuration data in SSO database, let say the usual configurations that we normally keep in a configuration file (“app.config”)). One of the great and useful tool that we normally use for archiving this is a custom tool original created by Richard Seroter, the: SSO Config Data Store Tool.

However since 2009 that Microsoft released a MMC snap-in to tackle this exact issue: SSO Configuration Application MMC Snap-In provides the ability to add and manage applications, add and manage key value pairs in the SSO database, as well as import and export configuration applications so that they can be deployed to different environment.

To install SSO Configuration Application MMC Snap-In you need to:

  • Unzip the SSOConfigurationMMCSnapIn.zip file available in Microsoft page.
  • This file is composed by three zip files, so after unzip the first file you should unzip also the SSOMMCSnapInSetup.zip file.
  • Run as Administrator the setup.exe or SSOMMCSnapInSetup.msi file
  • In the Welcome to the SSO Application Configuration Setup Wizard page, click “Next”

155-BizTalk-Server-2013-R2-SSO-App-Snapin

  • In the Select Installation Folder page:
    • Accept the default installation folder or set another one
    • In the “Install SSO Application for yourself, or for anyone who uses this computer” option, select “Everyone”
    • And click “Next”

156-BizTalk-Server-2013-R2-SSO-App-Snapin

  • In the Enter Company Name page, enter the name of your company and click “Next”

157-BizTalk-Server-2013-R2-SSO-App-Snapin

  • In the Confirm Installation page, click “Next” to install the SSO Application Configuration MMC Snap-In

158-BizTalk-Server-2013-R2-SSO-App-Snapin

  • In the installation Complete page, click “Close”

159-BizTalk-Server-2013-R2-SSO-App-Snapin

However unfortunately this tool will not work properly in BizTalk Server 2013 R2, at least running in Windows Server 2012 R2. At the first sight it seems that everything is working properly but when you try to create a key value pair you will see that nothing happens and no key is created:

160-BizTalk-Server-2013-R2-SSO-App-Snapin

To fix this issue I recompile the SSOMMCSnapIn.dll using the latest version of “Microsoft.EnterpriseSingleSignOn.Interop.dll” available with BizTalk Server 2013 R2 that you can download at Microsoft TechNet Gallery: BizTalk Server 2013 R2: Fix for SSO Configuration Application MMC Snap-In

Update: Notice that this issue it’s also documented here https://support.microsoft.com/kb/2954101 (Known issues in BizTalk Server 2013) and you will find different solutions to solve it.

To solve the issue you just need to overlap the existing SSOMMCSnapIn.dll file, normally present in “C:\Program Files\Common Files\Enterprise Single Sign-On” folder with this version of the file. Now if you try to add a new key value pair everything will work fine.

161-BizTalk-Server-2013-R2-SSO-App-Snapin

Configure BizTalk Jobs History (Microsoft SQL Server Agent job history log)

Have you ever notice that you never have present a log history of the Monitor BizTalk Server job?

170-BizTalk-Server-2013-R2-BizTalk-Jobs-History

The reason why this happens is that BizTalk Server is shipped out with a total of 13 SQL Agent jobs, most of them running each minute, the only exception is the Monitor BizTalk Server job that by default occurs every week on Sunday at 00:00:00.

And to be completely honest there are two problems present:

  • We rarely inspect our environment in the weekend, only in critical situations or customers that have a 25x 7 administration team.
  • By default the Microsoft SQL Server Agent job history log is configure to
    • “Limit size of job history log” with a maximum of 1000 rows
    • And “Maximum job history row per job” with 100 rows

168-BizTalk-Server-2013-R2-BizTalk-Jobs-History

Which means that a few minutes after the Monitor BizTalk Server job run successfully or unsuccessfully, it’s historic is overwritten with the row log historical of the remaining 12 jobs. Therefore never expected to have this historic job on Monday when you arrive to the office.

Because BizTalk Server has 13 Jobs to keep a decent and consistent job history log you should increase the “Limit size of job history log” according to the number of existing jobs in your environment, for example at least 1300 for BizTalk Server environment (100 for each job)

To resize the job history log based on raw size

  • In Object Explorer, connect to an instance of the SQL Server Database Engine, and then expand that instance.
  • Right-click SQL Server Agent, and then click Properties.
  • Select the History page, and then confirm that Limit size of job history logis checked.
  • In the Maximum job history log size box, enter the maximum number of rows the job history log should allow.
  • In the Maximum job history rows per job box, enter the maximum number of job history rows to allow for a job.

169-BizTalk-Server-2013-R2-BizTalk-Jobs-History

To resize the job history log based on time

  • In Object Explorer, connect to an instance of the SQL Server Database Engine, and then expand that instance.
  • Right-click SQL Server Agent, and then click Properties.
  • Select the History page, and then click Automatically remove agent history.
  • Select the appropriate number of Days(s), Week(s), or Month(s).

Force Full Backup BizTalk Server (BizTalkMgmtDb) job

I will not enter in much details in this steep, you can read more about it in my blog at: A different way to Force a Full Backup of the BizTalk Server databases.

The standard way is to use the “BizTalkMgmtDb.dbo.sp_ForceFullBackup” stored procedure. However, and unlike what many people think, this stored procedure does not perform a full backup it only marks internally on BizTalk Server databases that the next time the Backup BizTalk Server job runs it will need to perform a full backup of the data and log files. You really need to be aware of two important things:

  • The Backup BizTalk Server job is the only supported method for backing up the BizTalk Server databases. Use of SQL Server jobs to back up the BizTalk Server databases in a production environment is not supported.
  • You can use the SQL Server methods to backup the BizTalk Server databases only if the SQL Server service is stopped and if all BizTalk Server processes are stopped.

Alternative, to help one of my DBA teams you may create a custom Force Full Backup BizTalk Server job that is composed by two steps:

  • Step 1: Force Full Backup
    • That will call the “BizTalkMgmtDb.dbo.sp_ForceFullBackup” stored procedure
  • Step 2: Backup BizTalk Server
    • That will call the standard Backup BizTalk Server (BizTalkMgmtDb) job

1723-BizTalk-Server-2013-R2-Force-Full-Backup-BizTalk-Server-job

You can download the custom “Force Full Backup BizTalk Server (BizTalkMgmtDb)” Job from Microsoft | TechNet Gallery: Force Full Backup BizTalk Server (BizTalkMgmtDb) Job

Related links