BizTalk DevOps: How to take control of your environment – Disable Tracking Settings in BizTalk Server Environment

Probably this will be the first post of a series about “How to take control of your environment”, especially how to take back the control of your environment from the mistakes of developers. And don’t get me wrong I am mainly a developer but I also play the role of the administrator and sometimes I also make mistakes… especially this one that I will talk about.

Who are careful to disable the tracking options for all the artifacts before publishing the solution in a production environment?

Well, I sometimes forget to disable tracks event in orchestration: orchestration start and end, Message send and receive and Shape start and end; and sometimes we actually don’t need to track all this information, they will be there because someone forgot to disable it. Most important this information is only useful for orchestration debugger purpose when things are failing and we always can at any time turn it on for a specific application or orchestration, we don’t need that options active for all the applications.

What’re the implications of these settings being active in production?

“Document tracking can impact performance throughout BizTalk, not just Orchestration. For Orchestration, you should realize that Orchestration Event Tracking is on by default. This is useful during development and testing since Orchestration Events are required for Orchestration Debugger. However, if you do not intend to debug an Orchestration directly in production, you should turn Orchestration Event Tracking off. Orchestration Events are eventually moved to DTA_DEBUGTRACE table in BizTalkDTADB by TDDS. We have seen slow read/writes to this table once it gets large (several hundred thousand rows). What is considered large may vary due to your SQL Server hardware. In the end, if TDDS cannot move data efficiently into BizTalkDTADB, data is accumulated in BizTalkMsgBoxDB. Large MsgBoxDB can cause all of your hosts to slow down, and eventually lead to throttling.“ by Everett Yang (see: Thoughts on Orchestration Performance)

So as BizTalk Server processes more and more data on your system, the BizTalk Tracking (BizTalkDTADb) database may continue to grow in size that can cause poor disk performance.

Should I disable global tracking option?

By default, global tracking is enabled when you install BizTalk Server and if you are having performance issues in your environment that are momentarily addressed by purging the BizTalk tracking database, you may consider turning off global tracking, again momentarily, so that BizTalk stop collecting tracking information. You can accomplish that by modifying the group-level settings:

  • In the BizTalk Server Administration Console, expand BizTalk Server Administration, right-click BizTalk Group, and then click Settings.
  • In the BizTalk Settings Dashboard dialog box, on the Group page, do the following:
    • Disable “Enable group level tracking” option
BizTalk Settings Dashboard Enable group level tracking

However, I advise you to do this only cases of emergency when you are having performance issues in your production environment, otherwise, you should leave this option to enable at all time, why? Because turning off global tracking disables the tracking interceptors for the entire BizTalk Server group, which means, BizTalk Server will not track any events in its tracking tables. And sometimes we need to enable tracking for some artifacts.

So what’s the alternative?

The alternative is to configure for each application in each artifact: orchestrations, schemas, ports … the correct tracking settings. However, this is a thankless and unpleasant task, because we have to go into all artifacts, especially in Schemas, in order to configure them properly.

The first option to easily accomplish this task is to:

  • Go to the BizTalk Administration Console and Select “All Artifacts”
  • Select “Orchestrations” option and then select all the orchestrations available
  • Click “Tracking…” option in the right panel under “Selected Items” panel
BizTalk Administration Console All Artifacts tracking

By configuring the tracking options this will apply for all the selected orchestrations with only one operation. This will work fine for all the artifacts… except for Schemas! Because in Schemas you will need to go one by one.

The second option is using PowerShell script to accomplish this task, you could also do it with C# code but I think that PowerShell is a more familiar language for the administrators or sysadmins.

How can I automate this task?

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 tasks.

This is a simple script to disable all tracking settings for all the artifacts in your BizTalk Server Environment:

# Disable tracking settings in orchestrations    
$Application.orchestrations | 
%{ $_.Tracking = [Microsoft.BizTalk.ExplorerOM.OrchestrationTrackingTypes]::None }

# Disable tracking settings in Send ports       
$disablePortsTracking = New-Object Microsoft.BizTalk.ExplorerOM.TrackingTypes
$Application.SendPorts | 
%{ $_.Tracking = $disablePortsTracking }

# Disable tracking settings in Receive ports
$Application.ReceivePorts | 
%{ $_.Tracking = $disablePortsTracking }

# Disable tracking settings in pipelines        
$Application.Pipelines | 
%{ $_.Tracking = [Microsoft.BizTalk.ExplorerOM.PipelineTrackingTypes]::None }

# Disable tracking settings in Schemas
$Application.schemas | 
 ?{ $_ -ne $null } |
 ?{ $_.type -eq "document" } |
 %{ $_.AlwaysTrackAllProperties = $false }



You can download How to Disable Tracking Settings in BizTalk Server Environment with PowerShell from GitHub here:

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

5 thoughts on “BizTalk DevOps: How to take control of your environment – Disable Tracking Settings in BizTalk Server Environment”

  1. Excellent Article Sandro! I do have a question though, if you wanted to enable the ports rather than disable them what would the Track flag be for Send and Receive Ports? (Say you have deployed to a test environment and want to turn on tracking en-mass to help with debugging)?

    I did some digging and found for enabling tracking you could set the tracking flags to (in Powershell):

    $OrchestrationTracking = [Microsoft.BizTalk.ExplorerOM.OrchestrationTrackingTypes]::OrchestrationEvents -bor [Microsoft.BizTalk.ExplorerOM.OrchestrationTrackingTypes]::InboundMessageBody -bor [Microsoft.BizTalk.ExplorerOM.OrchestrationTrackingTypes]::MessageSendReceive -bor [Microsoft.BizTalk.ExplorerOM.OrchestrationTrackingTypes]::OutboundMessageBody -bor
    [Microsoft.BizTalk.ExplorerOM.OrchestrationTrackingTypes]::ServiceStartEnd -bor [Microsoft.BizTalk.ExplorerOM.OrchestrationTrackingTypes]::TrackPropertiesForIncomingMessages -bor

    $PipelineTracking = [Microsoft.BizTalk.ExplorerOM.PipelineTrackingTypes]::InboundMessageBody -bor
    [Microsoft.BizTalk.ExplorerOM.PipelineTrackingTypes]::OutboundMessageBody -bor
    [Microsoft.BizTalk.ExplorerOM.PipelineTrackingTypes]::MessageSendReceive -bor

    $SchemaTracking = $true

    But I am having issues determining how to have all the tracking options ticked for Send and Receive Ports?

    $SendPortTracking =
    [Microsoft.BizTalk.ExplorerOM.TrackingTypes]::BeforeSendPipeline -bor
    [Microsoft.BizTalk.ExplorerOM.TrackingTypes]::AfterSendPipeline -bor [Microsoft.BizTalk.ExplorerOM.TrackingTypes]::TrackPropertiesBeforeSendPipeline -bor [Microsoft.BizTalk.ExplorerOM.TrackingTypes]::TrackPropertiesAfterSendPipeline

    $ReceivePortTracking =
    [Microsoft.BizTalk.ExplorerOM.TrackingTypes]::BeforeReceivePipeline -bor
    [Microsoft.BizTalk.ExplorerOM.TrackingTypes]::AfterReceivePipeline -bor
    [Microsoft.BizTalk.ExplorerOM.TrackingTypes]::TrackPropertiesBeforeReceivePipeline -bor

    Are you able to shed some light into this?

      1. Hi Matt, actually I am working in a new version of the PowerShell script, and the idea was also to enable tracking in some cases, so is nice to know that you already did that 🙂
        I will try your script and let you know.

  2. I am looking for a database query to determine the status of the tracking events of a particular pipeline.
    I have found The status of the Before Pipeline and After Pipeline in the table BizTalkMgmtDb.dbo.StaticTrackingInfo.
    But where can i find the status of the tracking events?
    I only have database rights to query and no rights to execute procedures for powershell scripts so i hope to dind a database query

Leave a Reply

Your email address will not be published. Required fields are marked *


Back to Top