- 6 minutes to read

💡 Recommendations for BizTalk Logging

Unlock the full potential of your BizTalk Server logging with Nodinite. On this page, you will:

  • ✅ Maximize BizTalk Server performance and reliability with proven best practices
  • ✅ Optimize SQL Server, tracking, and system settings for robust, efficient logging
  • ✅ Ensure seamless, long-term integration and monitoring
  • ✅ Avoid common pitfalls with actionable, expert guidance

✅ To ensure a successful installation of Nodinite Logging from BizTalk Server, review the Recommended tracking settings for BizTalk Server default pipelines user guide.

You can boost the performance and reliability of your Microsoft BizTalk Server environment and the Nodinite Log agent for BizTalk by tuning Windows Servers, SQL Server instances, and BizTalk databases.

The changes described here help you achieve better performance by reducing unnecessary disk IO, optimizing network utilization, and creating a more robust environment.

At Nodinite, we strongly encourage all BizTalk Server customers to follow these steps—whether or not you use our product.

Important

Set MAX DEGREE OF PARALLELISM=1 only on the instance with BizTalkMsgboxDB, and make sure this is the only database in that instance! Review KB899000. With SQL Server 2016 SP2 and later, you can tune this setting at the database level.

SQL Server

Keep the tracking database small—large DTA databases can negatively impact BizTalk Server performance.

For example, the default configuration of the DTA Purge and Archive (BizTalkDTADb) SQL job includes an Archive operation that writes old data to disk. This process wastes resources. If you do not use these backups (for a 3rd party tool or custom portal), skip the archiving step as described in this guide.

If you do not keep and use your archived tracking databases, you do not need to create them in the first place.

Read more here

To purge the BizTalk tracking database without archiving, replace the DTA Purge and Archive (BizTalkDTADb) SQL job with the following command:

Replace the numbers with values that meet your design or policy criteria.

DECLARE @dtLastBackup DATETIME
SET  @dtLastBackup = GetUTCDate()
-- Note: Add logic here to get the datetime of the last successful backup of the BizTalkDTADb database! 
EXEC dtasp_PurgeTrackingDatabase 1, 4, 7, @dtLastBackup

This command deletes messages older than: 1 = 1 hour
4 = 4 days for all completed messages (data remains on Monday for changes made on Friday)
7 = 7 days for incomplete messages

Microsoft external web link

With this recommendation, you can manage a whole weekend of issues without losing any data due to the purge job.

Always On

If you use SQL Server Always On, apply the same configuration on ALL SQL Nodes. Also, make sure the SQL job runs without errors on passive nodes.

IF (sys.fn_hadr_is_primary_replica('BizTalkDTADb') = 1)  
BEGIN
    DECLARE @dtLastBackup DATETIME
    SET @dtLastBackup = GetUTCDate()
    -- Note: Add logic here to get the datetime of the last successful backup of the BizTalkDTADb database! 
    EXEC dtasp_PurgeTrackingDatabase 1, 4, 7, @dtLastBackup
END

Read more about sys.fn_hadr_is_primary_replica here

Optimize TempDB

We recommend these options for all SQL Server instances (any version):

  1. Add one extra file per core (up to 8)
    • Set files as static / no autogrowth
    • Use 128 MB per file
  2. Set the -T1118 flag on ALL BizTalk and Nodinite related SQL Server Instances (<2016)

BizTalk Tracking Database (BizTalkDTADB)

Tune your MessageBox and Tracking Database using the scripts below. The 'Set text in row option' for specific tables ensures small payloads (<=6000 bytes) stay in fewer SQL pages, which reduces IO.

  • Store the message payload on the same SQL Page as the event. This approach nearly halves the number of SQL IOs!

Read more here about SQL Pages

exec sp_tableoption N'[Tracking_Parts1]', 'text in row', '6000'
go
exec sp_tableoption N'[Tracking_Parts2]', 'text in row', '6000'
go
exec sp_tableoption N'[Tracking_Spool1]', 'text in row', '6000'
go
exec sp_tableoption N'[Tracking_Spool2]', 'text in row', '6000'
go
exec sp_tableoption N'[Tracking_Fragments1]', 'text in row', '6000'
go
exec sp_tableoption N'[Tracking_Fragments2]', 'text in row', '6000'
go

BizTalk Messagebox (BizTalkMsgBoxDB)

exec sp_tableoption N'Spool', 'text in row', '6000'
go
exec sp_tableoption N'Parts', 'text in row', '6000'
go

Registry Tweaks

You can disable the process where the Kerberos client verifies the Privilege Attribute Certificate (PAC) signature in the Kerberos ticket by using the domain controller.

Ports in Use for BizTalk Server

Enable BizTalk Tracking

You can enable BizTalk Tracking in several ways:

  1. Use the BizTalk Administration console manually (not recommended)

    • You do not log audits
    • You need BizTalk Administrative user rights
  2. Use Nodinite (Recommended)

    • Log Audited
    • Control access granularly (specific BizTalk application, single artifact, ...)
    • End-users do not need BizTalk Administrative user rights
    • Get an overview (e.g. see the whole picture)

Manage BizTalk Tracking Using Nodinite Remote Actions

Review the Manage BizTalk Server Tracking user guide.

Enable BizTalk Tracking using PowerShell

Enable tracking to log data from BizTalk into Nodinite. When you enable tracking, Nodinite starts archiving events and payload from the Tracking database into the Nodinite Log Databases.

The BizTalk Monitoring Agent also provides Remote Actions to manage tracking settings; review the Tracking user guide for more information.

Enable tracking using PowerShell:
ISE
Screenshot: Use an elevated ISE (x86) PowerShell window to enable BizTalk tracking on all ports, orchestrations, and pipelines.

<#
    Script to enable tracking in BizTalk.

    Param: bizTalkServer - The BizTalk application server
    Param: filter        - Application name filter
    Param: orchestration - Ignore or Disable orchestration tracking

    Usage: .\Enable-Tracking -bizTalkServer
           .\Enable-Tracking -bizTalkServer <Server name>
           .\Enable-Tracking -bizTalkServer <Server name> -filter Order
           .\Enable-Tracking -bizTalkServer <Server name> -orchestration Disable
#>

# User input
param(
    [string]$bizTalkServer = ".", 
    [string]$filter = "", 
    [ValidateSet("Ignore", "Disable")][string] $orchestration = "Ignore"
)

# Get BizTalk SQL Instance and database name
try {
    $bizTalkSQLInstance  = Get-WmiObject MSBTS_GroupSetting -Namespace root\MicrosoftBizTalkServer -ComputerName $bizTalkServer -ErrorAction Stop | Select-Object -Expand MgmtDbServerName
    $bizTalkManagementDb = Get-WmiObject MSBTS_GroupSetting -Namespace root\MicrosoftBizTalkServer -ComputerName $bizTalkServer -ErrorAction Stop | Select-Object -Expand MgmtDbName
} Catch {
    $reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $bizTalkServer)
    $key = $reg.OpenSubKey('SOFTWARE\Microsoft\BizTalk Server\3.0\Administration')
    $bizTalkSQLInstance  = $key.GetValue('MgmtDBServer')
    $bizTalkManagementDb = $key.GetValue('MgmtDBName')
}

# Connect to the BizTalk Management database
[void] [System.reflection.Assembly]::LoadWithPartialName("Microsoft.BizTalk.ExplorerOM")
$bizTalkCatalogExplorer = New-Object Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer
$bizTalkCatalogExplorer.ConnectionString = "SERVER=$bizTalkSQLInstance;DATABASE=$BizTalkManagementDb;Integrated Security=True;Connection Timeout=60;TrustServerCertificate=True"

function getTracking($port)
{
    $tracking = 0

    if (($port.GetType() -like 'Microsoft.BizTalk.ExplorerOM.SendPort') -or ($port.IsTwoWay))
    {
        $tracking = $tracking -bor
                    [Microsoft.BizTalk.ExplorerOM.TrackingTypes]::BeforeSendPipeline -bor
                    [Microsoft.BizTalk.ExplorerOM.TrackingTypes]::AfterSendPipeline -bor
                    [Microsoft.BizTalk.ExplorerOM.TrackingTypes]::TrackPropertiesBeforeSendPipeline -bor
                    [Microsoft.BizTalk.ExplorerOM.TrackingTypes]::TrackPropertiesAfterSendPipeline
    }

    if (($port.GetType() -like 'Microsoft.BizTalk.ExplorerOM.ReceivePort') -or ($port.IsTwoWay))
    {
        $tracking = $tracking -bor
                    [Microsoft.BizTalk.ExplorerOM.TrackingTypes]::BeforeReceivePipeline -bor
                    [Microsoft.BizTalk.ExplorerOM.TrackingTypes]::AfterReceivePipeline -bor
                    [Microsoft.BizTalk.ExplorerOM.TrackingTypes]::TrackPropertiesBeforeReceivePipeline -bor
                    [Microsoft.BizTalk.ExplorerOM.TrackingTypes]::TrackPropertiesAfterReceivePipeline
    }

    return $tracking
}
 
$applications = $bizTalkCatalogExplorer.Applications | Where-Object { $_.name -like "*$filter*"}

foreach ($application in $applications)
{
    $appName = $application.name

    Write-host "Enabling tracking for application: $appName" -ForegroundColor Cyan

    if ($orchestration -eq 'Disable')
    {
        # Disable tracking settings in orchestrations
        $application.Orchestrations | %{ $_.Tracking = [Microsoft.BizTalk.ExplorerOM.OrchestrationTrackingTypes]::None }
    }

    # Enable full tracking for send ports
    $application.SendPorts | %{ $_.Tracking = getTracking $_ }

    # Enable full tracking for receive ports
    $application.ReceivePorts | %{ $_.Tracking = getTracking($_) }

    $application.Pipelines | %{ $_.Tracking = [Microsoft.BizTalk.ExplorerOM.PipelineTrackingTypes]::InboundMessageBody -bor
                                              [Microsoft.BizTalk.ExplorerOM.PipelineTrackingTypes]::OutboundMessageBody -bor
                                              [Microsoft.BizTalk.ExplorerOM.PipelineTrackingTypes]::MessageSendReceive -bor
                                              [Microsoft.BizTalk.ExplorerOM.PipelineTrackingTypes]::ServiceStartEnd }
}

#
# Save tracking
#
$bizTalkCatalogExplorer.SaveChanges()

Write-host "Tracking is enabled" -ForegroundColor Green

Next Step

Install

Update
BizTalk Logging Agent PreReqs
BizTalk Logging Overview
Remote Actions