R0056 Installing BizTalk Server 2020 Basic Multi Computer Environment
R0056 Installing BizTalk Server 2020 Basic Multi Computer Environment
Multi-Computer Environment
Sandro Pereira
Microsoft Azure MVP
Contents
Author .......................................................................................................................................................... 5
BizTalk Server Installation scenario ............................................................................................................... 6
The need for a Domain Controller - Windows Groups and Service Accounts ................................................. 7
Create Domain Groups and Users............................................................................................................................ 7
Planning the use of a new Organizational Unit ........................................................................................................ 7
Windows Groups Used in BizTalk Server .................................................................................................................. 8
IIS_WPG and IIS_IUSRS Group (optional) ............................................................................................................... 11
Users and Service Accounts Used in BizTalk Server ................................................................................................ 12
Summary of Users and Groups Affiliation .............................................................................................................. 14
SQL Server Service Accounts ................................................................................................................................. 16
References ............................................................................................................................................................ 19
Preparing Computers for Installation - Important considerations before setting up the servers ................. 20
Join the Local Administrators Group ...................................................................................................................... 20
Change the Machine name.................................................................................................................................... 21
Requirements for the user running the BizTalk Server configuration wizard .......................................................... 22
Install Critical Windows Updates (optional) ........................................................................................................... 22
Disable IPv6 (optional) .......................................................................................................................................... 23
Turn off Internet Explorer Enhanced Security Configuration (optional) .................................................................. 24
Disable User Account Control (optional) ................................................................................................................ 25
UAC Group Policy Settings (optional) ................................................................................................................. 26
Turn Windows Firewall off (optional) .................................................................................................................... 28
Configure Microsoft Distributed Transaction Coordinator (MS DTC) ...................................................................... 29
Configuring Microsoft Distributed Transaction Coordinator (DTC) to work through a firewall or network address
translation firewalls (optional)........................................................................................................................... 31
COM+ Network Access considerations .................................................................................................................. 33
Customize Taskbar and Start Menu Properties (optional) ...................................................................................... 35
Preparing and Install SQL Server 2019 machine .......................................................................................... 37
Important considerations before setting up the servers ........................................................................................ 37
Install SQL Server 2019 .......................................................................................................................................... 37
Configure SQL Server Database Mail feature ......................................................................................................... 47
Install Microsoft SQL Server 2019 Cumulative Update 3 (CU3)............................................................................... 54
Configure SQL Server for Remote Connections ...................................................................................................... 54
Configured SQL Server protocols - Disable the Shared Memory Protocol, Enable TCP/IP and Named Pipes ........... 55
2
Validate Mail account used by BizTalk to send BAM Alerts .................................................................................. 106
Install BizTalk Adapter Pack ................................................................................................................................. 108
Microsoft BizTalk Adapter Pack and Microsoft BizTalk Adapter Pack (x64) ....................................................... 108
Steps to install BizTalk Adapter Pack ................................................................................................................ 109
Add adapters to BizTalk Administration Console.............................................................................................. 111
Install Critical Windows Updates, BizTalk Server Feature Packs and BizTalk Server Cumulative Update Package .. 113
Configure BizTalk Server SQL Jobs ....................................................................................................................... 114
How to configure the Backup BizTalk Server (BizTalkMgmtDb) ........................................................................ 114
How to configure the DTA Purge and Archive (BizTalkDTADb) ......................................................................... 118
MessageBox_Message_Cleanup_BizTalkMsgBoxDb ........................................................................................ 120
Optimize the BizTalk Server 2020 environment ........................................................................................ 121
Deleting BizTalk backup files ............................................................................................................................... 121
Implementing a custom sp_DeleteBackupHistory ............................................................................................ 121
Implementing a Maintenance Plan to clean BizTalk Database backup files....................................................... 122
Pre-allocate space and define auto growth settings for BizTalk Server databases ................................................ 127
Configure BizTalk Server Windows Services ......................................................................................................... 129
Install and configure BizTalk Health Monitor ....................................................................................................... 133
How to register BizTalk Health Monitor Snap-In .............................................................................................. 133
How to integrate BHM Snap-In into BizTalk Admin Console ............................................................................. 134
Install SSO Configuration Application MMC Snap-In ............................................................................................ 137
Configure BizTalk Jobs History (Microsoft SQL Server Agent job history log) ........................................................ 140
To resize the job history log based on raw size ................................................................................................ 141
Force Full Backup BizTalk Server (BizTalkMgmtDb) job ........................................................................................ 142
Managing and cleaning BizTalk Server MarkLog database tables ......................................................................... 144
Configure Hosts and Host Instances .................................................................................................................... 148
What are Hosts, Host Instances and Adapter Handlers? .................................................................................. 149
Best practices to Configuring Hosts and Host Instances ................................................................................... 150
How can I automate this task?......................................................................................................................... 151
Power Mode ....................................................................................................................................................... 152
Consider setting the 'text in row' table option to boost BizTalk Server Performance............................................ 153
How to exploit the Text in Row table option in BizTalk Server.......................................................................... 153
General network TCP settings that can impact BizTalk Server .............................................................................. 153
How to Disable the Scalable Networking Pack (SNP) features .......................................................................... 154
How to Disable Privilege Attribute Certificate (PAC) ........................................................................................ 155
4
Author
Written By Sandro Pereira [MVP & MCTS BizTalk Server 2010]
Sandro is very active in the BizTalk community as blogger (https://blog.sandro-pereira.com), member and moderator
on the MSDN BizTalk Server Forums, TechNet Wiki author, Code Gallery and CodePlex contributor, member of BizTalk
Brazil community (http://biztalkbrasil.blogspot.ae), NetPonto community (http://netponto.org), guest author at
BizTalk360 (https://blogs.biztalk360.com/author/sandro), editor of the magazine “Programar” (http://www.revista-
programar.info/?action=editions), public 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”
(https://www.biztalk360.com/biztalk-mapping-patterns).
He has been awarded the Microsoft Most Valuable Professional (MVP) since January 2011, for his contributions to the
world-wide BizTalk Server community (https://mvp.microsoft.com/en-us/PublicProfile/4030655) and currently holds
MCTS: BizTalk Server BizTalk Server 2006 and BizTalk Server 2010 certifications.
• 1 Domain controller
• 1 Virtual Machine to host SQL Server
o Windows Server 2019
o SQL Server 2019SQL Server 2019 Enterprise Edition
• 1 Virtual Machine to host BizTalk Server.
o Windows Server 2019
o BizTalk Server 2020 Enterprise or Development Edition
In this scenario, I will perform a basic full installation of Microsoft BizTalk Server 2020, except for the SharePoint
Adapter and additional components like Accelerators, ESB Toolkit or UDDI, emulating a production environment. The
following components will be installed:
(*) Although Microsoft has deprecated the BAM portal, it is still possible to install it.
6
We assume that all machines are already installed with the operating system and latest critical Windows updates
from Microsoft. Another presumption is that the domain controller is already installed and configured (this article
will not explain this step but you can get more information’s here).
The need for a Domain Controller - Windows Groups and Service Accounts
A very important difference between a single server and a multi-server installation is that the multi-server
configuration requires you to use domain users and groups to run the various BizTalk services, making having a domain
controller a necessity. These domain accounts and groups are used for the security configuration of the BizTalk Server
databases.
Because BizTalk and SQL are installed on separate machines, the use of a domain user account is, therefore, a necessity
so that the account can have access rights on both the BizTalk machine and the SQL Server machine.
The following information will be useful in creating these groups and accounts:
• In a multicomputer environment, BizTalk Server supports only domain groups and domain service accounts
• BizTalk Server 2020 supports only <NetBIOSDomainName>\<User> name formats for Windows groups and service
accounts
• BizTalk Server supports only Active Directory domain groups and user accounts in multi-computer configurations
Domain groups include Domain Local groups, Global groups, and Universal groups, which are supported in both
single computer and multi-computer environments
• Built-in accounts such as NT AUTHORITY\LOCAL SERVICE, NT AUTHORITY\NETWORK SERVICE, NT
AUTHORITY\SERVICE, NT AUTHORITY\SYSTEM, and Everyone are not supported when you install and configure
BizTalk Server 2020 in a multi-computer environment
Use the default group names whenever possible. The BizTalk Server setup automatically enters the default groups. If
there are multiple BizTalk Server groups within the same domain, you can change the names to avoid conflicts.
• As a personal opinion, I would prefer to keep the groups for the live environment (production) according the default
names
• Add an extension for the remaining environments like:
o “BizTalk Server Administrators DEV” or “BizTalk Server DEV Administrators”
An OU is an Active Directory container into which you can place users, groups, computers, and other organizational
units. By using them, you can create containers within a domain that represent the hierarchical or logical structures
within your organization.
• Enter “BizTalk” or “BizTalk Server Group” as the name of the new ‘Organizational Unit Object”
• Ensure to check “Protect container from accidental deletion” and press “OK”
NOTE : All these groups must be created within the OU created earlier
NOTE : The roles described in the column “SQL Server Roles or Database Roles” on the below table are
configured during the BizTalk Server configuration by the user that is running the BizTalk Server
Configuration tool. You don't need to create them manually.
NOTE : The principle of using an OU for BizTalk, can also be applied in case an organization has multiple
BizTalk environments. This will help in differentiating these environments
8
tool when configuring SSO master secret
server.
SSO Affiliate Administrators of certain SSO affiliate applications. Contains no service accounts.
Administrators
Can create/delete SSO affiliate applications, administer Contains account/group used for BizTalk
user mappings, and set credentials for affiliate Server Administrators.
application users.
BizTalk Server Has the fewest privileges necessary to perform Contains users/groups that need to be BTS_ADMIN_USERS SQL
Administrators administrative tasks. able to configure and administer BizTalk Server Database Role in the
Server. following databases:
Can deploy solutions, manage applications, and resolve
message processing issues. • BizTalkMgmtDb
• BizTalkMsgBoxDb
To perform administrative tasks for adapters, receive • BizTalkRuleEngineDb
and send handlers, and receive locations, the BizTalk • BizTalkDTADb
Server Administrators must be added to the Single Sign- • BAMPrimaryImport
On Affiliate Administrators.
db_owner SQL Server
For more information, see "Managing BizTalk Server Database Role for the
Security" at https://msdn.microsoft.com/en- following databases:
us/library/aa578061.aspx.
• BAMStarSchema
• BAMPrimaryImport
• BAMArchive
• BAMAlertsApplication
• BAMAlertsNSMain
• BAMAlertsApplication
• BAMAlertsNSMain
BizTalk Server The BizTalk Server Operator is a low privileged role that Contains users/groups that will monitor BTS_OPERATORS SQL
Operators only has access to monitoring and troubleshooting solutions. Server Database Role in the
actions following databases:
Contains no service accounts.
• BizTalkDTADb
• BizTalkEDIDb
• BizTalkMgmtDb
• BizTalkMsgBoxDb
• BizTalkRuleEngineDb
BizTalk Server Read This is a new group starting with BizTalk Server 2020. Contains users/groups that will monitor
Only Users group Members in this group can view Artifacts, service state, solutions.
message flow, and tracking information. Members do
not have privileges to perform any administrative Contains no service accounts.
operations.
BizTalk Server B2B A BizTalk role that reduces the onus on the Contains users/groups that must be able BTS_OPERATORS SQL
Operators Administrators to perform all Party management to configure and administer BizTalk Server Server Database Role in the
operation. This role allows windows users associated TPM data and monitor solutions. following databases:
with the role to perform all party management
operations. • BizTalkDTADb
• BizTalkMgmtDb
BizTalk Application The default name of the first In-Process BizTalk Host Contains service accounts for the BizTalk BTS_HOST_USERS SQL
Users Group created by Configuration Manager. In-Process host instance in the host that Server Database Role in the
the BizTalk Host Group is designated for. following databases:
Use one BizTalk Host Group for each In-Process host in
your environment. • BizTalkMgmtDb
• BizTalkMsgBoxDb
Includes accounts with access to In-Process BizTalk Hosts • BizTalkRuleEngineDb
(hosts processes in BizTalk Server, BTSNTSvc.exe). • BizTalkDTADb
• BAMPrimaryImport
BAM_EVENT_WRITER SQL
Server Database Role in the
BAMPrimaryImport
BizTalk Isolated Host The default name of the first Isolated BizTalk Host Group Contains service accounts for the BizTalk BTS_HOST_USERS SQL
Users created by Configuration Manager. Isolated BizTalk hosts Isolated host instance in the host that the Server Database Role in the
not running on BizTalk Server, such as HTTP and SOAP. Isolated BizTalk Host Group is designated following databases:
for.
Use one BizTalk Isolated Host Group for each Isolated • BizTalkMgmtDb
Host in your environment. • BizTalkMsgBoxDb
• BizTalkRuleEngineDb
• BizTalkDTADb
• BAMPrimaryImport
OPTIONAL: BAM Has access to BAM Portal Web site. Everyone group is used for this role by
Portal Users default.
OPTIONAL: Only required if you install/use BAM
Contains no service accounts.
For more information about BizTalk Server groups and accounts see Windows Groups and User Accounts in BizTalk
Server and for more information regarding BizTalk Server Security, see Managing BizTalk Server Security.
10
• Enter the Group name of the new Group
• Ensure to select “Group scope” as “Domain local” or “Global”, “Group Type” as “Security” and press “OK”
IIS_IUSRS is another group used by BizTalk Server 2020. However, unlike the previous groups, we do not need to create
this, because it is a built-in group with access to all the necessary file and system resources so that an account, when
added to this group, can seamlessly act as an application pool identity.
You don’t need to create the IIS_WPG group, unless you are thinking of using Microsoft BizTalk Accelerator for
RosettaNet. In this case, you need to manually create the IIS_WPG group to prevent the BizTalk Accelerator for
NOTE : All these users must be created within the OU created earlier
NOTE : The roles described in the column “SQL Server Roles or Database Roles” on the below table are
configured during the BizTalk Server configuration by the user that is running the BizTalk Server
Configuration tool. Normally, you don't need to create them manually.
Enterprise Single Sign-On Service account used to run Enterprise Single SSO Administrators
Service Sign-On Service, which accesses the SSO
database.
Suggestions:
User account for the SSO Administrator.
• SsoService
• srvc-bts-sso
• SsoAdmin
• usr-sso-admin
BizTalk Host Instance Service account used to run BizTalk In-Process BizTalk Application Users
Account host instance with accesses to In-Process BizTalk
host instance (BTNTSVC).
Suggestions:
• BTSHostSrvc
• srvc-bts-host
BizTalk Isolated Host Service account used to run BizTalk Isolated host BizTalk Isolated Host Users
Instance Account instance (HTTP/SOAP).
IIS_IUSRS (or/and IIS_WPG)
Suggestions:
• BTSIsolatedHostSrvc
• srvc-bts-isol-host
OPTIONAL: Rule Engine Service account used to run Rule Engine Update RE_HOST_USERS SQL Server
Update Service Service, which receives notifications to Database Role in the
BizTalkRuleEngineDb
12
Suggestions: deployment/undeployment policies from the
Rule engine database.
• ReuService
• srvc-bts-rule-engine OPTIONAL: Only required if you configure/use
Business Rule Engine
OPTIONAL: BAM Alerts User Service account used to run BAM Notification NSRunService SQL Server
Suggestions: Services, which accesses the BAM databases. Database Role in the
following databases:
• BamAlertsSrvs OPTIONAL: Only required if you configure/use
• srvc-bts-bam-alerts BAM Alerts • BAMAlertsApplication
• BamService • BAMAlertsNSMain
• srvc-bts-bam-ns N OTE: This account was previously known as
BAM Notification Services User BAM_ManagementNSReader
SQL Server role for the
BAMPrimaryImport
OPTIONAL: BAM User account for BAM Management Web service IIS_IUSRS (or/and IIS_WPG)
Management Web Service (BAMManagementService) to access various
User BAM resources. BAM Portal calls
BAMManagementService with the user
Suggestions: credentials logged on the BAM Portal to manage
alerts, get BAM definition XML and BAM views.
• BamWebService
• srvc-bts-bam-ws OPTIONAL: Only required if you configure/use
• srvc-bts-bam BAM Portal
OPTIONAL: BAM Application pool account for BAMAppPool, IIS_IUSRS (or/and IIS_WPG)
Application Pool Account which hosts BAM Portal Web site.
Suggestions:
• SsoService
• srvc-bts-sso
• SsoAdmin
• usr-sso-admin
Suggestions:
• BTSAdm
14
• usr-bts-admin
Suggestions:
• BTSHostSrvc
• srvc-bts-host
Suggestions:
• BTSIsolatedHostSrvc
• srvc-bts-isol-host
BizTalk Server Operators Contains no service accounts – You don’t need any
service account for this group. Instead you need to add
the domain users that need to perform Operation task
inside BizTalk Server
BizTalk Server B2B Operators Contains no service accounts – You don’t need any
service account for this group. Instead you need to add
the domain users that need to perform B2B Operation
task inside BizTalk Server
OPTIONAL: BAM Portal Users The Everyone group is used for this role by default.
Suggestions:
• BTSIsolatedHostSrvc
Suggestions:
• BamWebService
• srvc-bts-bam-ws
• srvc-bts-bam
Suggestions:
• BamApp
• srvc-bts-bam-ap
NOTE : All these groups must be created within the OU created earlier
Suggestions:
• srvc-sql-agent
SQL Server Database Service Service account used to run SQL Server Database
• srvc-sql- engine
SQL Server Analysis Service Service account used to run SQL Server Analysis
Suggestions:
• srvc-sql- analysis
SQL Server Reporting Service Service account used to run SQL Server Reporting
Suggestions:
• srvc-sql- reporting
SQL Server Integration Service Service account used to run SQL Server Integration
Suggestions:
• srvc-sql-integration
16
Alternatively, you can create a single Domain Account to run these services (like “sql-bts-service” or “srvc-sql-bts”)
Depending on the selection that you made while installing SQL Server, you will have the services installed in your
server.
You can configure your SQL Server related services either during the setup or after the installation using the SQL Server
Configuration Manager.
• Local User Account: This user account is created in your server where SQL Server is installed, this account does not
have access to network resources
• Local Service Account: This is a built-in Windows account that is available for configuring services in Windows. This
account has the same permissions as the accounts that are in the local Users group. Thus, it has limited access to
the resources in the server. This account is not supported for SQL SERVER and AGENT services
• Local System Account: This is a built-in Windows account that is available for configuring services in Windows. This
is a highly privileged account that has access to all resources in the server with administrator rights
• Network Service Account: This is a built-in Windows account that is available for configuring services in Windows.
This account has permissions to access resources in the network under the computer account
• Domain Account: This account is part of your domain that has access to network resources. It is always advised to
run SQL Server and related services under a domain account with minimum privileges needed
SQL Server service accounts can be configured either during installation or using SQL Server Configuration Manager.
The first one is part of the installation and configuration can be done during the step Instance Configuration. I’ll walk
you through changing a service account using SQL Server Configuration Manager.
• You can change the built-in account here to a Local User account or a Domain User account
18
Remember that you will need to restart the SQL Server and related services for the new service account to take effect
References
• Windows Groups and User Accounts in BizTalk Server
• Part 3: BizTalk High Availability Server Environment – SQL & BizTalk Active Directory Accounts
• Installing BizTalk Server 2010 and BAM in a Multi-Computer Environment manual
• Server Configuration - Service Accounts
As always, one of the downsides of dealing with a new version of Windows Server, is figuring out to where some of
the features/options have moved in this new release. Fortunately for us, Windows Server 2019 is similar or identical
to the previous one (Windows Server 2012 R2). This makes the installation and configuration process easier.
• In the console tree, expand “System Tools” → “Local Users and Groups”, and click “Groups”
• Right-click the “Administrators” group, click “Add to Group”, and then click “Add”
20
o To add a computer account to this group, click “Object Types”, select the “Computers” check box, and then
click “OK”. Under “Enter the object names to select”, type the name of the computer account that you
want to add to the group and then click “OK”.
NOTE : If you are planning to create a production environment, you can find the list of Windows user (or
service accounts) and group affiliations used by BizTalk Server and some best practices of naming
convention here: User and Service Accounts Used in BizTalk Server
NOTE : By default, the Windows Built-in\Administrators group has the sysadmin SQL role on the SQL Server
• Start by running the “Server Manager”, if it is not already open, on the Windows Start menu, click the Server
Manager option
• In the Server Manager Dashboard, from the scope pane (on the left side) click on “Local Server”
• In the Server Properties for the “Local Server”, click on the “Computer name” property to be able to change it
• Click on the “Change” button to edit computer name and domain information, which will pop up this dialog:
Requirements for the user running the BizTalk Server configuration wizard
The user running the BizTalk Server configuration must belong to the following user groups:
To simplify things put this user in the BizTalk Server Administrators group. After BizTalk Server is installed and
configured, the user no more needs to be part of the BizTalk Server Administrators group.
Again, by default, the Windows Built-in\Administrators group has the sysadmin SQL role on the SQL Server.
Once SQL Server is installed, you will be able to check that by opening SQL Server Management Studio, go to
“Security\Server Roles” and double-click on the “sysadmin” role. The pop-up window will show all the Windows and
SQL logins having the sysadmin role.
22
To install Windows updates:
o Or press the “Windows key” to open the Start menu, select “Settings” and then select the “Update &
security” option
• On the “Update & security” window, click “Check for updates” button and if new updates are available, install them
IPv6 can be disabled either through the “DisabledComponents” registry value or through the checkbox for the Internet
Protocol Version 6 (TCP/IPv6) component in the list of items on the Networking tab for the properties of connections
in the Network Connections folder. The following figure shows an example:
IMPORTANT NOTE: This step is optional, and I only suggest doing this in development environments. For
some clients, this feature can be very important in production environments and they don't want to disable
By default, Internet Explorer Enhanced Security Configuration is enabled on Windows Server 2019 and can be
configured through Server Manager.
To disable Internet Explorer Enhanced Security Configuration (IE ESC) in Windows Server 2019:
• Start by running the “Server Manager”, if it is not already open, from either:
o On the Windows taskbar, click the Server Manager button
o On the Start screen, click Server Manager
• In the Server Manager Dashboard, from the scope pane (on the left side) click on “Local Server”
• In the Server Properties for the “Local Server”, you’ll see the option for “IE Enhanced Security Configuration”. Click
“On” to change the option
24
• A dialog box appears, letting Internet Explorer Enhanced Security Configuration be enabled/disabled separately for
normal users and administrators; turn off both. After disabling both options, click “OK”
• Click the Refresh button at the top of the Server Manager and the “IE Enhanced Security Configuration” should now
show as “Off”
IMPORTANT NOTE : It is recommended that you leave UAC turned on to help make your computer secure.
This step is optional, and I only suggest doing this in development environments. For some clients, this
feature can be very important in production environments and they don't want to disable.
IMPORTANT NOTE : It is recommended that you leave the UAC Group Policy Settings to their defaults to help
make your computer secure. This step is optional, and I only suggest doing this in development
environments. For some clients, these settings can be very important in production environments and they
don't want to make changes to them.
If you don’t want to have Admin Approval Mode for your local administrators, there are 3 Local Group Policies you can
disable:
User Account Control: Admin Approval Mode for the built-in Administrator account
This policy setting controls the behavior of Admin Approval Mode for the built-in Administrator account.
• Enabled - The built-in Administrator account uses Admin Approval Mode. By default, any operation that
requires elevation of privilege will prompt the user to approve the operation
• Disabled - (Default) The built-in Administrator account runs all applications with full administrative privilege
User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode
This policy setting controls the behavior of the elevation prompt for administrators.
26
• Elevate without prompting - Allow privileged accounts to perform an operation that requires elevation
without requiring consent or credentials
• Prompt for credentials on the secure desktop - When an operation requires elevation of privileges, the user
is prompted on the secure desktop to enter a privileged username and password. If the user enters valid
credentials, the operation continues with the user's highest available privilege
• Prompt for consent on the secure desktop - When an operation requires elevation of privileges, the user is
prompted on the secure desktop to select either Permit or Deny. If the user selects Permit, the operation
continues with the user's highest available privilege
• Prompt for credentials - When an operation requires elevation of privileges, the user is prompted to enter an
administrative username and password. If the user enters valid credentials, the operation continues with the
applicable privilege
• Prompt for consent - When an operation requires elevation of privileges, the user is prompted to select
either Permit or Deny. If the user selects Permit, the operation continues with the user's highest available
privilege
• Prompt for consent for non-Windows binaries - (Default) When an operation for a non-Microsoft
application requires elevation of privilege, the user is prompted on the secure desktop to select
either Permit or Deny. If the user selects Permit, the operation continues with the user's highest available
privilege
This policy setting controls the behavior of all UAC policy settings for the computer. If you change this policy setting,
you must restart your computer.
• Enabled - (Default) Admin Approval Mode is enabled. This policy must be enabled, and related UAC policy
settings must also be set appropriately to allow the built-in Administrator account and all other users who are
members of the Administrators group to run in Admin Approval Mode
• Disabled - Admin Approval Mode and all related UAC policy settings are disabled
• Do the same for the rest of the policies you want to configure
• Restart the computer when done
IMPORTANT NOTE: This step is optional, and I only suggest doing this in development environments. For
some clients, this feature can be very important in production environments and they don't want to turn it
off. However, in many scenarios, these machines are not exposed to the outside and even if this occurs,
they can be “protected” by the network infrastructure and, in such cases, may not require that the Windows
Firewall be turned on.
28
o Or press the “Windows key” to open the Start menu, and then click “Control Panel”
o In “Control Panel” address bar, type “Control Panel\All Control Panel Items”, and then select “Windows
Firewall” option
• In the “Windows Firewall” panel, select “Turn Windows Firewall on or off” option
• Select the option “Turn off Windows Firewall (not recommended)” in both settings and click “OK”
• On the “Local DTC Properties” window, select the “Security” tab and:
o Ensure that the “Network DTC Access”, “Allow Inbound”, “Allow Outbound”, and “No Authentication
Required” options are selected, and all others are cleared.
30
o Click “OK”
• In the information window, click “Yes”
NOTE: If you have the firewall enabled in the machines or the machines are in different networks with
limited access (network restrictions), it is suggested that a minimum range of 200 ports are set, between
ports 49152 to 65535.
• The ephemeral port range from 1025 to 5000 was used by Windows Server 2003 and earlier
operating systems, however, there’s a Windows 2003 Cumulative Update that changes the port
range to 49152-65535
• The default ephemeral port range starting with Windows Vista/Windows Server 2008 (and newer
operating systems) is 49152-65535, as documented here or here
NOTE: If you receive COM+ related events or errors because of this setting you can revert it later or increase
the ports range accordingly.
References:
Configuring Microsoft Distributed Transaction Coordinator (DTC) to work through a firewall or network address
translation firewalls (optional)
For customers that want to maintain a high level of security, one of the ways to do this is to use a firewall between
the servers and, in this context, it is very important to properly configure both the BizTalk and SQL Server machines to
allow Microsoft Distributed Transaction Coordinator (MSDTC) ports on the firewall.
The MSDTC will by default use port 135, however, it will also use a wide range of ports to send and receive data. By
default, DTC uses Remote Procedure Call (RPC) dynamic port allocation, randomly selecting port numbers above 1024.
When it comes to configuring MSDTC to use a specific port range it is suggested that a minimum range of 200 ports
are set, between ports 49152 to 65535.
You can configure MSDTC to communicate through firewalls, including network address translation firewalls, just
follow these steps:
• Go to “Default Protocols” tab and select the “Connection-oriented TCP/IP” option in DCOM protocols
32
• Click “Ok”
• Ensure that “Internet range” is check in both options: “Port range assignment” and “Default dynamic port
allocation”
NOTE: It’s recommended that you review your Windows Firewall exceptions to avoid any DTC issues.
Though system and security settings will vary, you can investigate the appropriate exceptions by going to
Windows Firewall → Allow apps to communicate through Windows Firewall and review the exceptions
for Distributed Transaction Coordinator.
• DTCTester Tool - This tool verifies the transactions between two computers if SQL Server is installed on one
computer, using ODBC to verify transaction support against a SQL Server database. How To: Use DTCTester.
• DTCPing - This tool verifies transaction support between two computers, if SQL Server is not installed on either
computer. The DTCPing tool must be run on both the client and server computer. Learn more about the DTCPing
tool.
Previously, the Application Server role installation process provided an option for enabling COM+ Network Access.
When COM+ Network Access is enabled, a firewall exception rule is created that opens port 135.
In Windows Server 2019, the existing way to enable COM+ remote access is to:
• In the Allowed apps and features list, select the “COM+ Network Access” and “COM+ Remote Administration”
check boxes, and then select the appropriate scope that’s required for your application. For enterprises, this is
typically Domain. However, depending on the scenario, your application may require additional settings.
• Set the registry value that allows COM+ remote access. To do this, follow these steps:
o In the Start search box, type “regedit”, and then click regedit.exe in the results list
o Locate the following subkey: “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\COM3”
o Right-click the RemoteAccessEnabled DWORD
o In the Value data box, enter 1
34
o Click OK
A quick test of DCOM access is the DCOM test client/server app, however, to do this test is still necessary to give
permissions at the firewall level.
• Simply right-click the taskbar and choose “Settings” option to bring up the “Taskbar and Start Menu Properties”
dialog box
• On the “Notification & actions” dialog box, click “Turn system icons on or off” option
36
Preparing and Install SQL Server 2019 machine
This part of the article will focus on installing the SQL Server machine and all necessary requirements and components.
Before installing SQL Server or its prerequisites, make sure you have installed the latest critical Windows updates from
Microsoft.
NOTE: Using SQL Server Express Edition is not recommended or supported. The Express edition does not
include certain features needed by BizTalk Server
NOTE: BizTalk Server supports SQL Standard Edition version. However, to use Business Activity Monitoring
real-time aggregation (BAM RTA), you must install SQL Server Enterprise Edition because BAM real-time
aggregation (RTA) is not supported in the Standard Edition of SQL Server
NOTE: To fully use the BizTalk Server SDK or deploy BizTalk Server applications from a Visual Studio, you
should install the SQL Server Development Tools
NOTE: BizTalk Server supports all case-sensitive and case-insensitive SQL Server collations except for binary
collations. Binary collations are not supported
• Insert the SQL Server installation disk into the DVD-ROM drive. The setup program will begin automatically. If
prompted for automatic installation of prerequisite software, click “OK”
• On the SQL Server Installation Center, click “Installation” and then click “New SQL Server stand-alone or add
features to an existing installation”
• On the License Terms page, select “I accept the license terms”, and then click “Next” to continue
38
• In the Global Rules page, the setup procedure will automatically advance to the Product Updates window if there
are no rule errors. Otherwise, review the information and resolve any issues, and then click “Next” to continue
• On the Microsoft Update page, select “Use Microsoft Update to check for updates (recommended)” checkbox and
then click “Next” to continue.
•
• On the Install Setup files page, Setup provides the progress of downloading, extracting, and installing the Setup
files. If an update for SQL Server Setup is found and is specified to be included, that update will also be installed
o The System Configuration Checker verifies the system state of your computer before Setup continues
o If prompted to restart the computer, click "OK”
o
40
• On the Install Rules page, another rule check will be run to ensure everything is in place, to be sure the setup will
be successful. If a rule check fails, the setup application will provide the corrective measures to take, so installation
may proceed. Click on "Next" to continue
• On the Feature Selection page, select the following features, and then click “Next” to continue
o Database Engine Services
▪ SQL Server Replication
▪ R Services (in-Database) (optional)
▪ Full-Text and Semantic Extractions for Search
o Analysis Services
o Reporting Services - Native
o Shared Features
▪ Client Tools Connectivity
▪ Integration Services
▪
NOTE: SQL Server 2019 Data Tools is not included in the default installation of SQL Server 2019. Although
not necessary, if you wish to install you can download it here: https://msdn.microsoft.com/en-
us/library/mt204009.aspx.
• On the Feature Rules page, Setup verifies the system state of your computer before Setup continues. The Feature
Rules page will automatically advance, if all rules pass. Otherwise, review the information and resolve any issues,
and then click “Next” to continue
• On the Instance Configuration page, select “Default instance”, leave the rest of the default values, and then click
“Next” to continue
• On the Server Configuration page, you can specify login accounts for all the SQL Server services. You can assign
the same login account to all SQL Server services, or you can configure each service account individually. You can
also specify whether services start automatically, are started manually, or are disabled (Microsoft recommends
that you configure service accounts individually to provide least privileges for each service).
o Leave the default login account to all SQL Server services
o Configure all of them with the startup type: “Automatic”
o Click “Next”
42
• On the Database Engine Configuration page, select “Windows authentication mode”, click “Add Current User”,
and then click “Next”
o Authentication Mode: Select “Windows authentication mode”. If you select Mixed Mode Authentication,
you must provide a strong password for the built-in SQL Server system administrator account
o Specify SQL Server administrators: You must specify at least one system administrator for the instance of
SQL Server. To add the account under which SQL Server Setup is running, click “Add Current User”
• On the Analysis Services Configuration page, select “Multidimensional and Data Mining Mode”, click “Add Current
User”, and then click “Next”
o Server Mode: Select “Multidimensional and Data Mining Mode”. Server mode determines which memory
and storage subsystems are used on the server. If you plan to run multidimensional cube databases on
the server, choose the default option, Multidimensional and Data Mining server mode
o Specify which users have administrative permissions for Analysis Services: you must specify at least one
system administrator for Analysis Services. To add the account under which SQL Server Setup is running,
click Add Current User
NOTE : Once again, SQL Server Management Tools (Basic and complete) are not included in the default
installation of SQL Server 2019 and we need to install it using the “Install SQL Server Management Tools”
available on the SQL Server Installation Center.
• On the SQL Server Installation Center, click “Installation” and then click “Install SQL Server Management Tools”
44
• This will open a page in your browser, in which you can download the latest version of SQL Server Management
tools.
• Access the folder location in which you save the installation file and then execute the SQL Server Management
tools setup file: SSMS-Setup-ENU.exe
• On the Welcome page, click “Install”
NOTE : You have a similar option to install Reporting services and SQL Server Data Tools, if you desire to
install them.
46
NOTE : Once again, after this installation, I like to do a Windows update; this step is not necessary.
NOTE: Service packs and Windows Updates are supported and should be installed.
Database Mail is an enterprise solution for sending e-mail messages from the SQL Server Database Engine. Using
Database Mail, your database applications can send e-mail messages to users. The messages can contain query results
and can also include files from any resource on your network. You can read more here:
http://msdn.microsoft.com/en-us/library/ms189635.aspx
NOTE : You still can have BAM Portal with activities and aggregations without alerts. Database Mail is only
mandatory if you want to receive alerts.
Before we begin, we need to determine the server name and port number for the Simple Mail Transfer Protocol (SMTP)
server that we will use to send e-mails (if the SMTP server requires authentication, configure the username and
password for the SMTP server). In our case, this will be the local SMTP Server which we previously installed and
configured.
• Double click “Database Mail” to open the Database Mail Configuration Wizard
o Or right-click under “Database Mail” and select the option “Configure Database Mail”
• On the Welcome to Database Mail Configuration Wizard page, click “Next” to continue
48
• On the Select Configuration Task page, select “Set up Database Mail by performing the following tasks:” and click
“Next” to continue
o Set up Database Mail by performing the following tasks - Perform all the tasks required to set up
Database Mail for the first time.
o Manage Database Mail accounts and profiles - Create new Database Mail accounts and profiles or view,
change, or delete existing Database Mail accounts and profiles
o Manage profile security - Configure which users have access to Database Mail profiles
o View or change system parameters - Configure Database Mail system parameters such as the maximum
file size for attachments
• If Database Mail has not been enabled, you will receive the message: “The Database Mail feature is not available.
Would you like to enable this feature?” Click “Yes” to continue
•
• On the New Database Mail Account page, specify the Account name, Description, mail server information, and
Authentication type. Next, click “OK”
o A Database Mail account contains the information that SQL Server uses to send e-mail messages to an
SMTP server. Each account contains information for one e-mail server and doesn’t correspond to a SQL
Server account or a Microsoft Windows account. Database Mail can be sent using the credentials of the
SQL Server Database Engine, using other credentials that you supply, or anonymously. When using basic
authentication, the username and password in a Database Mail account are only used for authentication
with the e-mail server. There is no need that an account corresponds to a SQL Server user or a user on the
computer running SQL Server. You can specify the following:
▪ Account name - Enter the name of the new account
▪ Description - Enter a description of the account. The description is optional
50
▪ E-mail address - Enter the name of the e-mail address for the account. This is the e-mail address
that e-mail is being sent from. For example, an account for SQL Server Agent may send e-mail
from the address SqlAgent@Adventure-Works.com
▪ Display name - Enter the name which shows up on e-mail messages which are sent from this
account. The display name is optional. For example, an account for SQL Server Agent may display
the name "SQL Server Agent Automated Mailer" on e-mail messages
▪ Reply e-mail - Enter the e-mail address that will be used for replies to e-mail messages being sent
from this account. The reply e-mail is optional. For example, replies to an account for SQL Server
Agent may go to the database administrator, danw@Adventure-Works.com.
▪ Server name - Enter the name or IP address of the SMTP server, the account uses to send e-mail.
Typically, this is in a format similar to smtp.<your_company>.com. For help with this, consult your
mail administrator. As I said earlier, we will use our local SMTP Server, so the server name will be
“localhost”
▪ Port number - Enter the port number of the SMTP server for this account. Most SMTP servers use
port 25
▪ This server requires a secure connection (SSL) - Encrypts communication using Secure Sockets
Layer
▪ Windows Authentication using Database Engine service credentials - Connection is made
to the SMTP server using the credentials configured for the SQL Server Database Engine service
▪ Basic Authentication - Specify the username and password required by the SMTP server
▪ Anonymous authentication - Mail is sent to the SMTP server without login credentials. Use this
option when the SMTP server does not require authentication
• Back on the New Profile page, click “Next” to continue
• On the Manage Profile Security page, you will be able to set the Public, Private and Default Profiles, select our
profile as Public and Default and click “Next”
• On the Complete the Wizard page, review the actions to be performed and click “Finish” to complete creating the
new account
52
• On the “Configuring…” page, ensure that all actions have succeeded and then click “Close”
The Database Mail should now be configured successfully and all should be correctly set up to send emails. But we
must make sure by testing it. So, we will send a test email and confirm the reception. To do that:
• On the Send Test E-mail from windows, specify a “To:” email and click “Send Test E-Mail”
Microsoft SQL Server 2019 cumulative updates upgrade all editions and service levels of SQL Server 2019 to CU3. You
can use these packages to upgrade any of the following SQL Server 2019 editions:
• Run Microsoft SQL Server 2019 Management Studio and connect to the right instance
• Once the tool opens, right click the instance name and select “Properties”
• Go to “Connections” page and select the option “Allow remote connections to this server”
54
Configured SQL Server protocols - Disable the Shared Memory Protocol, Enable TCP/IP and
Named Pipes
Under certain stress conditions (such as clients accessing SQL Server from the same computer), the SQL Server Shared
Memory protocol may lower BizTalk Server performance. You can resolve this problem by disabling the use of the
Shared Memory network protocol in SQL Server Network Configuration. Also, to facilitate transactions between SQL
Server and BizTalk Server, you must enable TCP/IP and Named Pipes in SQL Server.
• Press the “Windows key” to switch to the Start screen, type “SQL Server Configuration Manager” and select the
“SQL Server 2019 Configuration Manager” option from the Search menu
• In SQL Server Configuration Manager window, from the left-hand pane, expand “SQL Server Network
Configuration” option and then click “Protocols for MSSQLSERVER”
o Verify that both “TCP/IP” and “Named Pipes” are enabled
▪ If not, right-click in the protocol, and then click “Enable”
• In the left-hand pane, click “SQL Server Services”, right-click “SQL Server (MSSQLSERVER)”, and then click “Restart”.
Alternatively, click “Stop” and when the service has stopped, right-click “SQL Server (MSSQLSERVER)” again, and
then click “Start”
Configure SQL Server Database Engine to listen on a specific TCP Port (optional)
This step is not mandatory and most of the time the default configuration doesn’t need to be modified. But sometimes,
from a security perspective, the client doesn’t want to use the default ports of the SQL Server.
If enabled, the default instance of the SQL Server Database Engine listens on TCP port 1433. Named instances of the
Database Engine and SQL Server Compact are configured for dynamic ports. This means that they select an available
port when the SQL Server service is started. When you are connecting to a named instance through a firewall, configure
the Database Engine to listen on a specific port, so that the appropriate port can be opened in the firewall.
• In SQL Server Configuration Manager, in the console pane, expand SQL Server Network Configuration, expand
Protocols for <instance name>, and then double-click TCP/IP.
• In the “TCP/IP Properties” dialog box, on the “IP Addresses” tab, several IP addresses appear in the format IP1, IP2,
up to IPAll.
56
o One of these is for the IP address of the loopback adapter, 127.0.0.1. Additional IP addresses appear for
each IP Address on the computer. Check all IP addresses to identify the IP address for which you want to
reconfigure the IP Port.
• If the TCP Dynamic Ports dialog box contains 0, indicating the Database Engine is listening on dynamic ports,
delete the 0.
After you have configured SQL Server to listen on a specific port, there are three ways to connect to a specific port
with a client application:
• Run the SQL Server Browser service on the server to connect to the Database Engine instance by name
• Create an alias on the client, specifying the port number
• Program the client to connect using a custom connection string
Reference: How to: Configure a Server to Listen on a Specific TCP Port (SQL Server Configuration Manager)
You will be able to configure the port that SQL Analysis Server is listening by:
• Opening the SQL Server Management Console and connect to Analysis Services
• Right Click on SQL instance and select “Properties” option
• On the “General” tab, go to “Port” and set the port that you want to configure, in my case “2382”
When we want to install BizTalk Server with a remote SQL Server using non-default port, we can use the format
“servername, port number” for a BizTalk installation. However, if we try to use the combination
“servername\instance, port number” it will give you the following error:
• Error Configuration Framework]Feature: [Group] Failed to configure with error message [Exception of type
'System.EnterpriseServices.TransactionProxyException' was thrown.]
For this reason, we may need to create a SQL Server Alias on the client machine (BizTalk Server) to connect to SQL
Server machine. Nevertheless, if we use an SQL Alias to configure the BizTalk Server we will also need to create the
Alias on the SQL Server machines otherwise the BizTalk Server jobs may fail, especially the Backup BizTalk Server
(BizTalkMgmtDb) job.
On SQL Server, an alias can be created on the client machine by running the SQL Server Configuration Manager tool.
• Press the “Windows key” to switch to the Start screen, type “SQL Server Configuration Manager” and click in “SQL
Server 2019 Configuration Manager” option from the Search menu
• Expand the SQL Native Client 11.0 Configuration option, right click on the “Aliases” item and select the “New
Aliases” item.
• In the “Alias – New” dialog box, you can create an alias where you can specify the instance name and the port
number it is using.
o In the “Alias Name”, set the name for the alias: “BizTalkSQL”
Sandro Pereira | DevScope | MVP & MCTS BizTalk Server 2010.
58
o In “Port No” specify the port where Database Engine running is listening: 1433
o In “Protocol” leave the default value “TCP/IP”
o In “Server” specify “servername\instance”
o Click “OK”
• To avoid problems of 32 and 64 bits, do the exact same SQL alias on the SQL Native Client 11.0 Configuration
(32bit) by expanding the SQL Native Client 11.0 Configuration (32bit) option, right click on the “Aliases” item and
select the “New Aliases” item.
Direction:
For the Enterprise Single Sign-On service to connect to the SSO database
1434 UDP Microsoft SQL Monitor used for monitoring Microsoft SQL Databases
2382 TCP To update and retrieve information from the BAM Analysis database
445 TCP To create the OLAP data file (.mdb) on the remote computer
2725 TCP To create and configure the database, and to retrieve data for analysis
(PivotTable reports)
Reference:
See more information here: Configure the Windows Firewall to Allow SQL Server Access
60
Inbound Rules
To make DCOM applications work in Windows Server 2019 you need to add the COM+ network access as shown
below:
• Also, we need to enable Microsoft Distributed Transaction Coordinator (MS DTC) to communicate through a
firewall with another machines, by Enabling the followings rules:
o Distributed Transaction Coordinator (RPC)
o Distributed Transaction Coordinator (RPC-EPMAP)
o Distributed Transaction Coordinator (TCP-In)
• BizTalk Server Health Monitor or event BizTalk Administration Console use WMI to Query SQL Server and for that
reason we also need to enable Windows Management Instrumentation to communicate through a firewall. We
can archive that by Enable the followings rules:
o Windows Management Instrumentation ( ASync-In)
o Windows Management Instrumentation (DCOM-In)
o Windows Management Instrumentation (WMI-In)
• In the “New Inbound Rule Wizard” window, in step “Rule Type”, select the "Port" option
• In step "Protocol and Ports", select the protocol requested and specify the port or list of ports
• In step "Action", select "Allow the connection" option
• In step "Profile", leave the default options
• In step "Name", set the name and description of the rule
Outbound Rules
First thing is to enable the following outbound rules:
• Distributed Transaction Coordinator (TCP-Out) – this will allow Outbound traffic for the Distributed Transaction
Coordinator
To do this, follow the steps described in Inbound Rules as the steps are the same. The only difference is that we are
dealing with Outbound Rules.
• Right click on “Outbound Rules” on the left tree and select the option “New Rule”
• In the “New Outbound Rule Wizard” windows in step “Rule Type” select "Port" option
• In step "Protocol and Ports"
o Select the protocol: TCP
o Specify the range of ports: 50000-50200
• In step "Action", select "Allow the connection" option
• In step "Profile", leave the default options
• In step "Name", set the name and description of the rule
62
Prepare and install prerequisites on BizTalk Server 2020 machine
This part of the paper focusses on installing the BizTalk prerequisites and operate the necessary configuration on the
BizTalk Server machine.
Before installing BizTalk Server or its prerequisites, make sure you have installed the latest critical Windows updates
from Microsoft.
• HTTP adapter
• SOAP adapter
• Windows SharePoint Services adapter
• Secure Sockets Layer (SSL) encryption
• BAM Portal
• EDI
• UDDI
• Start by running the “Server Manager”, if it is not already open, on the Windows Start menu, click the “Server
Manager” option.
• Under the “Manage” menu, select “Add Roles and Features” (or press “Add roles and features” under the
Dashboard panel)
• On the Installation Type screen, select “Role-based or feature-based installation” and click “Next”
64
• On the Server Selection screen, select the appropriate server, leave the default options and click “Next”
o Select a server from the server pool
o The local server is selected by default
• On the Features screen, no additional features are needed for IIS, however, in addition to the default values, we
will need or should select or the following options:
66
▪ Select all options
o Management Tools
▪ IIS Management Console
▪ IIS 6 Management Compatibility
• IIS 6 Metabase Compatibility
• IIS 6 Management Console
• IIS 6 Scripting Tools
• IIS 6 WMI Compatibility
• When the IIS installation completes, the wizard reflects the installation status on the Results screen
• Open a command prompt as administrator and run the “adsutil” command. To do this, Press the “Windows key”
to open the Start menu and type “cmd” on the Start Search box, right-click in “Command Prompt” and select from
the context menu the “Run as administrator” option.
Or:
• Change the value of 'Enable 32-bit Applications' from False to True. Click “OK”
68
Install Windows Identity Foundation (WIF) (optional)
In the previous step “Enable Internet Information Services” I mentioned that we should install the Windows Identity
Foundation 3.5 feature, why?
If you plan to configure/use the SharePoint Services adapter or SharePoint Online when used with SharePoint Services
Client-Side Object Model (CSOM), then Windows Identity Foundation (WIF) feature is required.
Windows Identity Foundation is included with the operating system (Windows Server 2019, Windows Server 2016,
Windows Server 2012 R2 and Windows 10) as a Feature in Turn Windows features on or off.
If you didn’t previously install WIF, then you should follow these steps:
• Start by running the “Server Manager”, if it is not already open, from either:
o On the Windows taskbar, click the Server Manager button
o On the Start screen, click Server Manager
• Under the “Manage” menu, select “Add Roles and Features” (or press “Add roles and features” under the
Dashboard panel)
• On the Before You Begin screen, click “Next”
• On the Installation Type screen, select “Role-based or Feature-based Installation” and click “Next”
• On the Confirmation screen, select “Restart the destination server automatically if required” and click “Install”:
• When the installation completes, the wizard reflects the installation status on the Results screen
• Click “Close” to exit the wizard
70
IMPORTANT NOTE : BizTalk Server 2020 supports only the 32-bit version of Microsoft Office.
The following procedure installs only Microsoft Office Excel. You can install additional Microsoft Office system
applications and tools if you wish, but they are not necessary to complete the installation of BizTalk Server.
IMPORTANT NOTE : To successfully load BAM.xla into Excel, you will need to install the “VISUAL BASIC FOR
APPLICATIONS” option under “OFFICE SHARED FEATURES”. Otherwise, you may get the error “This workbook
has lost its VBA project, ActiveX controls, and any other programmability-related features.”.
In previous Office versions, such as Office 2010 or 2013, Microsoft used to provide traditional MSI’s (Windows Installer)
that allowed Office users to select, at the time of installation, the desired Office programs available in the Office suite,
so that the Office setup wizard installs only selected programs in their computers or servers. However, with Office
2016 version, Microsoft has started using a new virtualization technology called "Click-to-Run" or "C2R Installer" to
distribute Office setup and installation files.
The limitation in this new installer technology, is that it doesn't allow you to select, at the time of installation, the
desired Office programs we want to install. Instead, the installer downloads and installs all the Office programs in the
Office suite.
For a BizTalk Server environment, we don’t want to have the entire Office suite installed in our server. Instead, we
only want to install Excel 2016. Fortunately, Microsoft provides a separate official tool called "Office 2016 Deployment
Tool" for us to be able to customize the “Click-to-Run” installer options, so that you can force the installer to install
only the desired Office programs.
With the help of this tool, you can download Office setup files at your desired location and then configure the installer
to install your selected Office apps only. You can also select which language should be installed and customize lots of
setup options.
• The installer will ask you to select a folder to extract the files. Select any desired folder
NOTE : You can download Office setup files using the Office Deployment Tool setup.exe file or you can use
the Office 2019 ISO file which you may have previously downloaded.
72
Installing Microsoft Office Excel 2019
To install Microsoft Office Excel:
• Open the container folder in which you extract the Office Deployment Tool and open the “configuration.xml” file
with an editor of your choice, for example notepad
• Replace the content of the file with the following configuration:
<Configuration>
<Add SourcePath="D:\" OfficeClientEdition="32">
<Product ID="O365ProPlusRetail" >
<Language ID="en-us" />
<ExcludeApp ID="Access" />
<ExcludeApp ID="Groove" />
<ExcludeApp ID="InfoPath" />
<ExcludeApp ID="Lync" />
<ExcludeApp ID="OneDrive" />
<ExcludeApp ID="OneNote" />
<ExcludeApp ID="Outlook" />
<ExcludeApp ID="PowerPoint" />
<ExcludeApp ID="Project" />
<ExcludeApp ID="Publisher" />
<ExcludeApp ID="SharePointDesigner" />
<ExcludeApp ID="Visio" />
<ExcludeApp ID="Word" />
</Product>
</Add>
</Configuration>
o Where “SourcePath” is the path to the drive with the Office 2019 ISO file attached or the path to where
you want to download the Office programs to be installed afterwards.
• Open the folder containing setup.exe and configuration.xml files in a command window by pressing and holding
the SHIFT key on your keyboard, then right click on an empty area in the folder and select the option "Open
command window here".
o This will open the Command Prompt window with the current directory active
• Finally, to install the Office Excel 2019, you just need to type the following command in Command Prompt and
press Enter:
o setup.exe /configure configuration.xml
o NOTE : you will also have the option “setup.exe /download configuration.xml” to download the required
office setup files.
After installing Excel and tools, I like to do a Windows update, however this step is not necessary.
74
NOTE : Visual Studio 2019 is not required if you are installing BizTalk Server on a production environment
(runtime only), on which it is not required to do application development and/or application debugging.
IMPORTANT NOTE : The BizTalk Server runtime components require .NET Framework 4.7. In addition, the .NET
Framework 3.0 is required if the Windows Communication Foundation (WCF) adapter or WCF Interceptor
are planned to be installed.
ADDITIONAL NOTE : If you install Visual Studio before installing BizTalk Server and then upgrade to Visual
Studio Team Explorer, you may need to repair your BizTalk Server installation from the Control Panel /
Programs option.
• In the Select Features window, select .NET desktop development and then select Install.
BizTalk Server does not require any of the optional features. However, sometimes it is important to install at least
some of the “Microsoft Web Developer Tools” options. Add the following features to your installation:
o ASP.NET and web development
o Office/SharePoint Development (not required)
o Azure PowerShell under Individual components (not required)
o Click Once Publishing under Individual components (not required)
• If the Start after installation checkbox has been checked, Visual Studio will be started automatically upon
finishing the installation.
IMPORTANT NOTE :
76
IMPORTANT NOTE : Although Visual Studio has been installed, the installation of BizTalk Server 2020 will not
detect that and install the required Visual Studio templates. Instead, you need to visit the Visual Studio
Marketplace (https://marketplace.visualstudio.com/) to get the BizTalk Server developments tools.
• BizTalk project template, templates, and tools for schema, orchestration, pipeline, map development, and test
• BizTalk server application project template for automatic deployment and application lifecycle management
(ALM) experience
• WCF LOB Adapter SDK for developers who need to integrate dynamic and complex line-of-business systems as
part of an enterprise application integration effort
• In the Search box, type BizTalk Server and chose to download the BizTalk Server development tools provided by
Microsoft
78
• It will automatically download and install these components
• To finalize you need to close all Microsoft Visual Studio windows that are open. And next time you will open
Visual Studio, the BizTalk Server project template will be available for you to start developing your solutions
• SQL Server Management tools (previously SQL Server Client Tools Connectivity) must be installed on the local
BizTalk Server computer when SQL Server is remote. SQL Server Management tools will install the client libraries
required to communicate with the remote instance of SQL Server
• You can install the latest version of SQL Server Management tools that are compatible with SQL Server 2019 on
the local BizTalk Server computer
• The remote SQL Server must be running during BizTalk Server configuration
• The TCP and UDP ports you specified during the SQL Server setup process must be open during BizTalk Server
configuration
• If you plan to use Analysis Services remotely, the OLAP client tools present in Microsoft SQL Server 2019 Feature
Pack (previous SQL Server OLAP client) must be installed on the local computer
o Microsoft® Analysis Services OLE DB Provider for Microsoft SQL Server® 2016 (SQL_AS_OLEDB.msi)
o Microsoft® SQL Server® 2016 ADOMD.NET (SQL_AS_ADOMD.msi)
o Microsoft® SQL Server® 2016 Analysis Management Objects (SQL_AS_AMO.msi)
• To configure BAM tools, you need to have SQL Server Management tools installed on the BizTalk BAM Server
• Named instances of SQL Server Analysis Services are not supported
You can configure BAM Primary Import, BAM Archive, BAM Star Schema, BAM Analysis, and BAM Notification Services
Application databases on different computers. The following are the software requirements when SQL Server is
installed on a computer other than the BizTalk Server:
80
BAM Tools BAM Primary Import Tables ADOMD.NET SQL Server SQL Server 2008 R2 or SQL
and BAM Archive database Integration Services Server 2012
BAM Tools Enable Analysis Services for SQL Server Integration SQL Server 2008 R2 Analysis
BAM aggregations Services Services or SQL Server 2012
Analysis Services
BAM Notification Enable Notification Services If using SQL Server 2008 R2, If using SQL Server 2012,
Services for BAM alerts install SQL Server 2005 configure SQL Server Database
Application Notification Services Engine Mail.
Database Components.
The BAM Alerts requirements
The BAM Alerts are documented at Preparing
requirements are Your Computer for
documented at Preparing Installation.
Your Computer for
Installation.
NOTE : The service account used for the OLAP service should have db_datareader permissions on the BAM
Star Schema database.
The SQL Server Client Tools (must be the same version that is installed on the remote SQL Server) install the client
libraries which are required to communicate with the remote instance of SQL Server.
NOTE : SQL Server Management Tools (Basic and complete) are not included in the default installation of
SQL Server 2019. You can install the latest version of SQL Server Management tools online or install it from
the installation media in the option “Install SQL Server Management Tools” (which will be explained later).
• Insert the SQL Server 2019 installation disk into the DVD-ROM drive. The setup program will begin automatically.
If prompted for automatic installation of prerequisite software, click OK.
• On the SQL Server Installation Center, click “Installation” and then click “Install SQL Server Management Tools”
• Download the SQL Server Management tools and store in a convenient folder
• Access the folder location in which you saved the installation file and then execute the SQL Server Management
tools setup file: SSMS-Setup-ENU.exe.
• On the Welcome page, click “Install”
82
• The setup will extract and install all the necessary packages and will provide you with an overview of the installation
progress
Download and install the OLAP client tools, present in the Microsoft SQL Server 2016 Feature Pack (previous SQL
Server OLAP client:
• Microsoft® Analysis Services OLE DB Provider for Microsoft SQL Server® 2016 (SQL_AS_OLEDB.msi)
Create SQL Alias to communicate with remote SQL Server using Non-Standard Port (optional)
Again, when we want to install BizTalk Server with a remote SQL Server, using a non-default port, we can use
“servername, port number” for the BizTalk installation. However, if we try to use the combination
“servername\instance, port number” it will give you the following error:
• Error Configuration Framework]Feature: [Group] Failed to configure with error message [Exception of type
'System.EnterpriseServices.TransactionProxyException' was thrown.]
For this reason, we may need to create a SQL Server Alias on the client machine (BizTalk Server), to connect to the SQL
Server machine.
An alias can be created on the client machine by running the SQL Server Client Network Utility (cliconfg.exe) tool. You
will want to repeat the following steps for each BizTalk Server in your environment:
• Press the “Windows key” to open the Start menu and type:
o C:\Windows\SysWOW64\cliconfg.exe
• On the General tab, select “TCP/IP” from the Disabled protocols” and click “Enable
84
o Enter in the computer name of your SQL Server and Instance
o Specify the port number
o Click “OK”
• Then click “Apply” and “OK”
NOTE: If you have a more secure SQL environment and changed the default port along with adding a SQL
instance, this method will still work. You will need to uncheck Dynamically determine port and enter the
new port number you configured for SQL Server. You will only need to enter the SQL Server computer name
and not add in the instance name.
• Navigate to c:\Windows\System32 and repeat the previous steps to redo the same alias. It is best to keep the
connection to SQL consistent, even if you end up not needing the 32-bit and 64-bit alias.
Direction:
Reference:
Inbound Rules
To make DCOM applications work in Windows Server 2019, you need to add the COM+ network access as shown
below:
• As described previously on “Configure Firewall on SQL Server machine”, enable the following inbound rules by
selecting them, right click and select the option “Enable Rule”
o COM+ Network Access (DCOM-In)
o COM+ Remote Administrator (DCOM-In)
• Also, enable Microsoft Distributed Transaction Coordinator (MS DTC) to communicate through a firewall with
another MS DTC:
o Distributed Transaction Coordinator (RPC)
o Distributed Transaction Coordinator (RPC-EPMAP)
o Distributed Transaction Coordinator (TCP-In)
Now we need to create new rules for each of port, as described in the topic “List of ports between SQL Server and
BizTalk Server” to allow SQL Server to communicate with the BizTalk Server machine. As described previously on
“Configure Firewall on SQL Server machine”
Outbound Rules
First thing is to enable the following outbound rules:
• Distributed Transaction Coordinator (TCP-Out) – this will allow Outbound traffic for the Distributed Transaction
Coordinator
• Right click on “Outbound Rules” on the left tree and select the option “New Rule”
• On “New Inbound Rule Wizard” window, in step “Rule Type”, select the "Port" option
• In step "Protocol and Ports"
o Select the protocol: TCP
o Specify the range of ports: 50000-50200
• In step "Action" select "Allow the connection" option
• In step "Profile" leave the default options
86
• In step "name" set the name and description of the rule
• TCPView – This is a Windows program that will show you detailed listings of all TCP and UDP endpoints on your
system and can be obtained from Microsoft: TCPView
• DTCPing - This tool is designed to assist with troubleshooting Microsoft DTC Firewall Issues and can be obtained
from Microsoft: DTCPing.exe
• DTCTester – This tool tests a distributed transaction against a specified Microsoft SQL Server. This tool helps to test
distributed transactions across firewalls or against networks. The tool performs distributed transactions by using
ODBC API against a SQL Server database and can be obtained from Microsoft: DTCTester
• SQL Server 2019 Client Tools – Tools to communicate with the remote instance of SQL Server
TCPView
Before running this tool and since this tool runs on a dynamic port, we must check which port this tool is listening on
both machines and add an inbound rule in each firewall. To accomplish that, we can use the tool TCPView.
TCPView is a Windows program that will show you detailed listings of all TCP and UDP endpoints on your system,
including the local and remote addresses and state of TCP connections.
DTCPing
To test DTCPing tool you must run this tool on both the machines, then you can test whether the normal RPC
communication is working or not.
DTCTester
To test DTCTester you must create an ODBC Data Source in the BizTalk machine. You can accomplish that by
88
• Press the “Windows key” to switch to the Start screen
• Type “ODBC Data sources (32-bit)” and click on “ODBC Data sources (32-bit)” option from the Search menu
• Select the “Add” button, select “SQL Server” option and click “Finish”
90
• Press “Ok” three times
• Access from the command line (run→cmd), from BizTalk Server machine and run the following commands:
o Go to DTCTester directory
o Type dtctester <odbc name> <user name> <password>
o Example: dtctester SQLTest myuser mypass
92
Install and configure BizTalk Server 2020 machine
This part of the article will focus on installing and configuring BizTalk Server 2020 and additional components.
When you installed SQL Server, setup granted your account Database Administrator rights. Since these rights are
also required for installing BizTalk Server, you must do one of the following:
• Use the same account you used when you installed SQL Server
• Make sure the account you’re using now, also has Database Administrator rights and is also a local administrator
• Close any programs you have open. Run the BizTalk Server 2020 installer as Administrator
• On the Start page, click “Install Microsoft BizTalk Server 2020”
• On the Customer Information page, type your user name and organization, enter your product key, and then click
“Next”
• On the License Agreement page, accept the license agreement by selecting “Yes. I accept the terms of the license
agreement” option, and then click “Next”
• On the Component Installation page, review the available components and select the ones you want to install.
o Choose all possible components
o Accept the default installation location or click Browse to move to the location where you want to install
BizTalk Server 2020.
o And then click “Next”
94
• In earlier versions of BizTalk Server, the installer allowed you to select how the required prerequisites are
installed. BizTalk Server 20202 however, automatically installs these prerequisites for you.
• On the Summary page, verify that the components that you selected to install are correct
o To enable auto-logon after a system reboot, click “Set” and provide your logon information. Auto-logon is
enabled only for reboots during setup and is disabled when setup is complete
o You can also enable the Install Latest BizTalk Server Cumulative Update (Recommended) checkbox. If
you did select the checkbox, the installer will check if there are any Cumulative Updates and install these
CU’s.
o Click “Install” to start the installation process
96
• Press the “Windows key” to open the Start menu, type “regedit” and click in “regedit” option from the Search
window
• When the Registry opens, browse to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\BizTalk Server\3.0
o If keys exist in the 3.0 folder, the setup was succeeded
NOTE : Because this is a multi-Computer BizTalk Server installation we cannot use a “Basic Configuration”
option. You must select “Custom configuration” option.
• Press the “Windows key” to open the Start menu, type “BizTalk Server Configuration” or “BizTalk”, right click
“BizTalk Server Configuration” option from the Search window, and then click Run as Administrator.
• On the Microsoft BizTalk Server 2020 Configuration page, apply the following configurations and then click
“Configure” to continue:
o Select “Custom configuration” option
o In the “Database server name” field under “Database” properties, enter the name of the database server
o In the “Service credential” properties, type the Username and Password for the account that will be used
for running the BizTalk services
98
• On the Enterprise SSO Secret Backup tab, set a secret backup password, password reminder and the location of the
SSO backup file
o The master secret is the key used to encrypt all the information stored in the SSO database. If the master
secret server fails and you lose the secret, you will not be able to retrieve the information stored in the SSO
database. Therefore, it is very important to back up the master secret as soon as you generate it.
o There can be only one master secret server in your SSO system.
o Most IT departments have a password vault. This could be the ideal place to store this data
• On the Group tab, select “Create a new BizTalk Group” and place the following configuration:
100
• On the BAM Tools tab, select “Enable Analysis Services for BAM aggregations” and place the following
configuration:
• On the BAM Alerts tab, select “Enable BAM Alerts” and place the following configuration:
102
On the REST APIs tab, select “Enable BizTalk REST APIs” and place the following configuration:
You can check if the configuration went well by having a look at the Windows Event Log, there should be a lot of
Information entries and no errors or warnings related to BizTalk.
You should also start the BizTalk Server administration console and verify whether the BizTalk Server host instance is
started (found under BizTalk Group\Platform Settings\Host Instances). Try stopping and starting the host instance.
104
Since the new UI in Windows Server 2012 or 2012 R2, almost all programs are “hidden” and can easily be accessed
through context search from the Start screen. However, constantly be doing this type of operations, eventually
becomes annoying.
So, to be able to quickly and easily access BizTalk Server Administration Console, you can pin the console to the taskbar.
To accomplish that you need:
• Press the “Windows key” to open the Start menu, type “BizTalk Server Administration” or “BizTalk” and right click
in “BizTalk Server Administration” option from the Search window and select the “Pin to taskbar” option to add
“BizTalk Server Administration” to your desktop taskbar
• Or press the “Windows key” to open the Start menu, expand “All Apps > Microsoft BizTalk Server 2020”, right click
on “BizTalk Server Administration” and select “Pin to Start” to have the BizTalk Server Administration console easy
at hand in the Start menu
• From the Start menu, drag the “BizTalk Server Administration” tile to the taskbar
• Press the “Windows key” to switch to the Start screen, type “SQL Management” or “SQL” and click in “SQL Server
Management Studio” option from the Search menu
• In Object Explorer panel, connect to the SQL Server instance you want to configure Database Mail on and expand
the server tree
• Expand the “Management” node and double click “Database Mail” to open the Database Mail Configuration Wizard
• On the Welcome to Database Mail Configuration Wizard page, click “Next” to continue
• On the Select Configuration Task page, select “Manage Database Mail accounts and profiles” option and click
“Next”
• On the Manage Profiles and Accounts page, select “View, change or delete an existing account” option, and click
“Next”
106
• On the Manage Existing Account page, select the “BAM_Alerts_Account” option under “Account name” and
validate the configuration. After that, click “Next” to make any changes or “Cancel” to exit.
Finally, you should test sending an email with this Database Mail Account. To do that:
If all goes well, you should receive the email in a few seconds. If you have received the email, you have been able to
configure Database Mail successfully.
Although Microsoft BizTalk Server 2020 contains a number of additional adapters, like the Office365 Outlook adapters,
an Azure Blob Storage adapter and the EventHub adapter, there is also the Microsoft BizTalk Adapter Pack. This pack
contains adapters that enable enterprise applications and databases to interface with each other, by implementing a
common adapter framework. Similar to programming to access Web services, adapters enable clients to develop
software to access 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 Pack and Microsoft BizTalk Adapter Pack (x64)
If I’m preparing an x64 environment machine, why do I need to install both x86 and x64 Microsoft BizTalk Adapter
Pack and not only the x64 pack?
On any computer where you want to perform design-time tasks using either Visual Studio or BizTalk MMC, you must
install the 32-bit adapter because:
• BizTalk Server Administration console runs as a 32-bit Microsoft Management Console (MMC) application
• Visual Studio is also a 32-bit application (and there isn’t any 64-bit version of Visual Studio)
108
• If you want to run the adapters under a 32-bit BizTalk process (Host Instance): you need to install Microsoft BizTalk
Adapter Pack
• If you want to run the adapters under a 64-bit BizTalk process (Host Instance): you need to install Microsoft BizTalk
Adapter Pack (x64)
So, you always have to install Microsoft BizTalk Adapter Pack, or in other cases, you always need to install the 32-bit
adapter, if you want to perform any operation at design-time, especially, configuring the adapters in the BizTalk Server
Administration console
• Close any programs you have open. Run the BizTalk Server 2020 installer as Administrator
• On the Start page, click “Install Microsoft BizTalk Adapters for enterprise Applications”
o On the End-User License Agreement page, select “I accept the terms in the License Agreement” to accept
the license agreement and click “Next”
o
o In the Choose Setup Type page, select the installation type “Complete”:
▪ Typical: will install the common runtime and tools
▪ Custom: will allow you to select the features that you want to install and the installation location
▪ Complete: will install all the features
o On the Choose Destination Location page, choose the folder location that to want to install this features
and click “Next”
110
o On the Ready to install page, click “Install”
o On the Completing the Microsoft BizTalk Adapters for Enterprise Applications Setup page, click “Finish”
• Open the BizTalk Administration Console, by pressing the “Windows key” to switch to the Start menu, type “BizTalk
Server Administration” or “BizTalk” and click the “BizTalk Server Administration” option from the Search window
• In the tree view in the left of the console, 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…”
112
• Repeat steps to add the other adapters
NOTE : These configurations requires that you restart the host instance associated with the adapters.
Install Critical Windows Updates, BizTalk Server Feature Packs and BizTalk Server Cumulative
Update Package
Once again, after you finish installing all the components, you should check and install all Windows update available
and install the latest BizTalk Cumulative Update package and BizTalk features packs. If necessary, restart the server
(note that this step may not be required).
• Execution of the BizTalk Server SQL Agent jobs are crucial for managing the health of the BizTalk Server databases
and for maintaining optimal performance
• The Backup BizTalk Server job is the only supported method to backup the BizTalk Server databases and requires
that all the BizTalk Server databases are configured to use the SQL Server full recovery model
BizTalk is shipped out with a total of 13 SQL Agent jobs. By default, the following BizTalk jobs aren’t configured and
enabled upon installation.
The two jobs that need configurations are the two most important ones:
• the "Backup BizTalk Server"
• the "DTA Purge and Archive"
If you want these functionalities, and you do…, you must configure and enable them.
114
• Step 2 – BackupFull – Performs full database backups of the BizTalk Server databases
• Step 3 – MarkAndBackUpLog – Backs up the BizTalk Server database logs
• Step 4 – Clear Backup History – Specifies for how long the backup history is kept
This job step calls a stored procedure named sp_SetBackupCompression on the BizTalk management database
(BizTalkMgmtDb by default) to set the value on the adm_BackupSettings table.
Step 2 – BackupFull
The BackupFull step is responsible for performing a full backup of the database.
exec [dbo].[sp_BackupAllFull_Schedule] 'd' /* Frequency */, 'BTS' /* Name */, '<destination path>' /* location of
backup files */
Where:
• Frequency: The default is d (daily). This is the recommended setting. Other values include h (hourly), w (weekly),
m (monthly), or y (yearly)
• Name: The default is BTS. The name is used as part of the backup file name
• Location of backup files: Replace ‘<destination path>’ with the full path (the path must include the single quotes)
to the computer and folder where you want to back up the BizTalk Server databases
• Force full backup after partial backup failures (@ForceFullBackupAfterPartialSetFailure): The default is 0 when
not specified, which means that if a log backup fails, no full backups are done until the next full backup frequency
interval is reached.
o Replace with 1, if you want a full backup to be made whenever a log backup failure occurs.
• Local time hour for the backup process to run (@BackupHour): The default is NULL when not specified, which
means that backup job will not be associated with the time zone of the BizTalk Server computer and will run at
midnight UTC time (0000).
o If you want to backup to run at a particular hour in the time zone of the BizTalk Server computer, specify
an integer value from 0 (midnight) to 23 (11 PM) as the local time hour for the BackupHour parameter.
• Use local time (@UseLocalTime): This is an extra parameter that you can also add that tells the procedure to use
local time. The default value is 0.
o If set to 0, then it uses current UTC time – GETUTCDATE() – 2007-05-04 01:34:11.933
o If set to 1, then it uses local time – GETDATE() – 2007-05-03 18:34:11.933
Step 3 – MarkAndBackUpLog
The MarkAndBackupLog step is responsible for marking the logs for backup and then backing them up.
exec [dbo].[sp_MarkAll] 'BTS' /* Log mark name */, '<destination path>' /* location of backup files */
116
Where:
• @MarkName: Log mark name is part of the naming convention for backup files:
o <Server Name>_<Database Name>_Log_< Log Mark Name >_<Timestamp>
• @BackupPath: You must change the destination path this to a valid one. It may be local or a UNC path to another
server
• @UseLocalTime: This is an extra parameter that you can also add, which tells the procedure to use local time
o exec [dbo].[sp_MarkAll] 'BTS' /* Log mark name */,'<destination path>' /*location of backup files */ , 1
exec [dbo].[sp_MarkAll] 'BTS' /* Log mark name */, '< your_destination_path>\BizTalk Database\Logs' /* location of
backup files */
The original script clears out the instances in the adm_BackupHistory table older than 14 days:
Where:
• @DaysToKeep: specifies how long the backup history is kept in the Adm_BackupHistory table. Periodically clearing
the backup history helps to maintain the Adm_BackupHistory table at an appropriate size
o The default value for the DaysToKeep parameter is 14 days
• @UseLocalTime: This is an extra parameter that you can also add that tells the procedure to use local time
o exec [dbo].[sp_DeleteBackupHistory] @DaysToKeep=14 , @UseLocalTime =1
IMPORTANT NOTE : This job step does not provide functionality for deleting backup files that have
accumulated over time. You can solve this problem by implementing you custom sp_DeleteBackupHistory
or by creating a Maintenance Plan to delete BizTalk Database Backups files (see more details E RROR! REFERENCE
SOURCE NOT FOUND .).
After having it properly configured, you need to enable the Backup BizTalk Server job:
• Under “Jobs” in SQL Server Management Studio Object Explorer, Right click on the name of the job “Backup BizTalk
Server (BizTalkMgmtDb)” and select “Enable” option
The job is configured to call the stored procedure dtasp_BackupAndPurgeTrackingDatabase, which uses the six
parameters you must configure in this job:
• @nLiveHours: Any completed instance older than the (live hours) + (live days) will be deleted along with all
associated data. The default is 0 hours
• @nLiveDays: Any completed instance older than the (live hours) + (live days) will be deleted along with all
associated data. The default interval is 1 day
• @nHardDeleteDays: All data (even if incomplete) older than this, will be deleted. The time interval specified for
HardDeleteDays should be greater than the live window of data. The live window of data is the interval of time, for
which you want to maintain tracking data in the BizTalk Tracking (BizTalkDTADb) database. Anything older than this
interval is eligible to be archived at the next archive and then purged. The default is 30 days
• @nvcFolder: Folder in which to put the backup files
• @nvcValidatingServer: Server on which validation will be done. A NULL value indicates no validation is being done.
The default is NULL
• @fForceBackup: Default is 0. This is reserved for future use
• Start by running the “SQL Server Management Studio”. If it is not already open, press the “Windows key” to switch
to the Start screen, type “SQL Server Management” or “SSMS” and click in “SQL Server Management Studio vv”
option from the Search menu
118
• In Object Explorer panel, connect to the SQL Server instance and expand the server tree
o Expand the “SQL Server Agent” node
o Expand the “Jobs” node
• Double click “DTA Purge and Archive (BizTalkDTADb)” to open the job properties window
• In the Job Properties - DTA Purge and Archive (BizTalkDTADb) dialog box, under “Select a page”, click “Steps”
• In the “Job step list”, click Archive and Purge, and then click Edit
exec dtasp_BackupAndPurgeTrackingDatabase
0, --@nLiveHours tinyint, --Any completed instance older than the live hours +live days
30, --@nHardDeleteDays tinyint = 0, --all data older than this will be deleted.
0 --@fForceBackup int = 0 --if this flag is set to 1 we will force a backup at that point
exec dtasp_BackupAndPurgeTrackingDatabase
0, --@nLiveHours tinyint, --Any completed instance older than the live hours +live days
30, --@nHardDeleteDays tinyint = 0, --all data older than this will be deleted.
0, --@fForceBackup int = 0 --if this flag is set to 1 we will force a backup at that point
1 --@fHardDeleteRunningInstances --if this flag is set to 1 we will delete all the running service instances older than
hard delete days. By default, this new parameter is set to 0.
• Any completed instance that is older than the live days plus live hours will be deleted, as will any associated data
• Any data older than the HardDeleteDays will be deleted
BizTalk gives you the option to Archive and Purge the tracking data or just simply purge the data without archiving. So,
in a development machine, we don’t need to maintain the archived tracking data, so I just purge it periodically:
• Change the SQL Statement inside the “DTA Purge and Achieve” SQL Job to:
o Without any BizTalk Server 2020 Cumulative Updated installed
Where:
exec dtasp_PurgeTrackingDatabase
1, --@nHours tinyint, --Any completed instance older than the live hours +live days
0, --@nDays tinyint, --will be deleted along with all associated data
7, --@nHardDays tinyint, --all data older than this days will be deleted
@dtLastBackup, --@dtLastBackup datetime,
1 --@fHardDeleteRunningInstances int = 0, --if this flag is set to 1 we will delete all the running service instances older
than hard delete days. By default, this new parameter is set to 0.
After having it properly configured, you need to enable the DTA Purge and Archive job:
• Under “Jobs” in SQL Server Management Studio Object Explorer, right click on the name of the job “DTA Purge and
Archive (BizTalkDTADb)” and select the “Enable” option
• In the result screen, click “Close”
MessageBox_Message_Cleanup_BizTalkMsgBoxDb
This job removes all messages that are not referenced by any subscribers in the BizTalkMsgBoxDb database tables.
120
IMPORTANT NOTE : This job is also started by the
MessageBox_Message_ManageRefCountLog_BizTalkMsgBoxDb job. Therefore, we recommend that you
keep this job disabled.
However, many times it is forgotten that these two jobs, by default, don’t provide functionalities for deleting backup
files that have accumulated over time on our file system and we normally forget to create a “process” or a “job” to
accomplish this until it is too late. The result of that is… lots of times we just remember when the disks are full, and
BizTalk stops working!
NOTE : Did you know that you can push your BizTalk database backup files to Azure blob storage? This can
be particularly handy when you have deployed BizTalk on Azure VM’s! Read more about that in this
article: Configure the Backup Job.
You can solve this problem by implementing your custom sp_DeleteBackupHistory or by creating a Maintenance Plan
to delete the BizTalk Database Backups files.
• Start SQL Server Management Studio and then connect to the BizTalk Management Database. By default, this
database is named BizTalkMgmtDb
• Click New Query to open a Query Editor window
• Run the following Transact-SQL script to create the sp_DeleteBackupHistoryAndFiles stored procedure:
• Change the “Clear Backup History” step of the Backup BizTalk Server job, so that it calls the
sp_DeleteBackupHistoryAndFiles stored procedure instead of the sp_DeleteBackupHistory stored procedure
However, personally I don’t like this approach for two main reasons:
Instead, I really prefer to take advantage of all features that SQL Server gives me and create a Maintenance Plan with
a Cleanup task to remove these files.
The main advantage of this approach is that this gives us more flexibility for further changes, and we can also use them
for other backups that we have.
NOTE : You should ensure that the SQL Server Agent service is running, because the Maintenance Plans
depend on the Microsoft SQL Server Agent in order to run on a regular basis.
122
IMPORTANT NOTE : this example is created to run in a developer machine, so if you are implementing this
approach in production environments make sure to keep the backups for the time you see that fit your
requirements or make sure the backups are saved in an external storage, before you delete these files
from the file system.
• Open the SQL Server Management Studio by pressing the “Windows key” to switch to the Start screen, type “SSMS”
or “SQL Server Management” and click on the “SQL Server Management Studio” option from the Search menu
• Expand the server and then the “Management” folder
• Right click “Maintenance Plans” and select “Maintenance Plan Wizard”. This launches the wizard and you can now
step through and create a plan customized to meet your maintenance requirements
124
• Back to the Select Plan properties page, click “Next”
• On the “Select Maintenance Tasks” page, select “Maintenance Cleanup Task” from the list and click “Next”
• On the “Complete the Wizard” page, verify the choices made on the previous pages and click Finish
• On the Maintenance Wizard Progress page, verify if every action was successfully executed and then click “Close”
126
Pre-allocate space and define auto growth settings for BizTalk Server databases
By default, the BizTalk Server databases are defined with small files size and with the parameter “Auto growth” set to:
The Auto growth setting plays an important role in BizTalk configuration for performance reasons, why?
SQL Server database auto growth is a blocking operation, which hinders BizTalk Server database performance. When
SQL Server increases the size of a file, it must first initialize the new space before it can be used. This is a blocking
operation that involves filling the new space with empty pages.
• Set this value (databases auto-growth) to a fixed value of megabytes instead of a percentage, so SQL server doesn’t
waste its resources expanding the data and log files during heavy processing. This is especially true for the
MessageBox and Tracking (DTA) databases:
o In a high throughput BizTalk Server environment, the MessageBox and Tracking databases can significantly
increase. If auto growth is set to a percentage, then auto growth will be substantial as well.
o As a guideline for auto growth, for large files increment should be no larger than 100 MB, for medium-sized
files 10 MB, or for small files 1 MB.
o This should be done in such a way that, if auto growth occurs, it does so in a measured fashion. This reduces
the likelihood of excessive database growth.
• Also, allocate sufficient space for the BizTalk Server databases, in advance to minimize the occurrence of database
auto growth.
However, checking and changing all BizTalk databases manually is too much work and can be a little boring…
ALTER DATABASE BizTalkMgmtdb MODIFY FILE (NAME = BizTalkMgmtDb_log , SIZE = 512MB , FILEGROWTH =
100MB)
GO
ALTER DATABASE BizTalkMsgBoxDb MODIFY FILE (NAME = BizTalkMsgBoxDb , SIZE = 2GB , FILEGROWTH =
100MB)
GO
ALTER DATABASE BizTalkMsgBoxDb MODIFY FILE (NAME = BizTalkMsgBoxDb_log , SIZE = 2GB , FILEGROWTH =
100MB)
GO
ALTER DATABASE SSODB MODIFY FILE (NAME = SSODB , SIZE = 512MB , FILEGROWTH = 100MB)
GO
ALTER DATABASE SSODB MODIFY FILE (NAME = SSODB_log , SIZE = 512MB , FILEGROWTH = 100MB)
GO
ALTER DATABASE BAMPrimaryImport MODIFY FILE (NAME = BAMPrimaryImport , SIZE = 150MB , FILEGROWTH =
10MB)
GO
ALTER DATABASE BAMPrimaryImport MODIFY FILE (NAME = BAMPrimaryImport_log , SIZE = 150MB ,
FILEGROWTH = 10MB)
GO
ALTER DATABASE BAMArchive MODIFY FILE (NAME = BAMArchive , SIZE = 70MB , FILEGROWTH = 10MB)
GO
ALTER DATABASE BAMArchive MODIFY FILE (NAME = BAMArchive_log , SIZE = 200MB , FILEGROWTH = 10MB)
GO
ALTER DATABASE BizTalkRuleEngineDb MODIFY FILE ( NAME = BizTalkRuleEngineDb , FILEGROWTH = 1024KB )
GO
ALTER DATABASE BizTalkRuleEngineDb MODIFY FILE ( NAME = BizTalkRuleEngineDb_log , FILEGROWTH =
1024KB )
GO
The execution of this SQL script will automatically set the values for all BizTalk Server databases, according to what is
recommended. Not only the auto growth property, but also the database and log file size:
• BizTalkDTADb (BizTalk Tracking database): Data file having a file size of 2 GB with 100 MB growths and a log file
of 1 GB with 100 MB growths.
128
• BizTalkMgmtdb (BizTalk Management database): Data file having a file size of 512 MB with 100 MB growths and
a log file of 512 MB with 100 MB growths.
• SSODB (SSO database): Data file having a file size of 512 MB with 100 MB growths and a log file of 512 MB with
100 MB growths.
• BizTalkMsgBoxDb (BizTalk MessageBox database): Data file having a file size of 2 GB with 100 MB growths and a
log file of 2 GB with 100 MB growths.
• BAMPrimaryImport (BAM Primary Import database): Data file having a file size of 150 MB with 10 MB growths
and a log file of 150 MB with 100 MB growths.
• BAMArchive (BAM Archive): Data file having a file size of 70 MB with 10 MB growths and a log file of 200 MB with
10 MB growths.
• BizTalkRuleEngineDb (Rule Engine database): Data file with 1 MB growth and a log file with 1 MB growth.
NOTE : These values were used for a standalone environment. In a high throughput BizTalk Server
environment, you should consider dividing the BizTalkMsgBoxDb into 8 data files, each having a file size of
2 GB with 100 MB growths and a log file of 20 GB with 100 MB growths. Because the BizTalk MessageBox
databases are the most active, we recommend you place the data files and transaction log files on
dedicated drives to reduce the likelihood of problems with disk I/O contention, as is explained here:
http://msdn.microsoft.com/en-us/library/ee377048.aspx.
The script can be found and download on Microsoft TechNet Gallery: Pre-allocate space and define auto-growth
settings for BizTalk Server databases.
The previous version of BizTalk Server also had this problem for:
• Despite being configured as “Automatic”, the Recovery properties are configured properly to restart the service
after failures
To properly configure the BizTalk Services, “Enterprise Single Sign-On Service” and “BAMAlerts” Windows service:
130
• Press the “Windows key” to open the Start menu, type “Services” and click on “View local services” option from
the Search window
• In the Services window, on the Services (Local) panel select the service for example “BAMAlerts”, right click and
select “Properties” option
You could and should apply the same Recovery properties configurations for the SQL Server services:
132
And should be configured as:
You can download the standalone version of BHM from Microsoft Download Center here: BizTalk Health Monitor.
Note that, at the time of writing, BHM officially does not support BizTalk Server 2020. So, use of bHM against BizTalk
Server 2020 is at your own risk!
Prerequisites:
After you have downloaded the BHM42.exe file from the Microsoft Download Center, you need to unzip it. Next, use
the “BHMSetup.exe”, which comes with the BizTalk Health Monitor tool to register the BHM snap-in.
IMPORTANT NOTE : Unzip the BHM42.exe to a final destination before you register the snap-in for example:
“C:\Program Files (x86)\Microsoft BizTalk Server Support Tools\BHMv4.2”. Once you register the BizTalk
Health Monitor Snap-In you cannot delete the folder or BHM will stop working.
NOTE : New versions of the BHM snap-in (version 3.1 and later) don’t include the “InstallUtil.exe” file anymore:
• You can still use the old “InstallUtil.exe” file to register the snap-in (but you need to copy this file to
the BHM folder – see Installing the new BizTalk Health Monitor snap-in on Biztalk Server 2010 or
BizTalk Server 2013)
• Instead, you should use the “BHMSetup.exe” file now which will register the snap-in (see BizTalk
Health Monitor v3.1 released!) in a simpler way.
• Navigate to the directory file where you unzipped the BHMv42.exe file
o For example C:\Program Files (x86)\Microsoft BizTalk Server Support Tools\BHMv4.2
• Launch “BHMSetup.exe” as an administrator
• Under Options you can:
o Change the installation location of BHM
o Choose to create a shortcut of BHM on the desktop
o Choose to launch BHM after the setup is completed
• Click on “Start Installing” to begin the installation. You will get a message when the installation gets completed. It
shouldn’t take more than a few seconds.
IMPORTANT NOTE : BHM Snap-In can be used independently, and it doesn't need to be integrated with the
BizTalk Administration Console. The handicap of this approach is, that a BizTalk Administrator will need to
use two different places/tools to monitor and administrate the environment.
To make life for BizTalk Administrators easier, the BHM Snap-In can also be integrated, so that it can be used within
the BizTalk Administration Console.
• Press the “Windows key” to open the Start menu, type “mmc /32” and right-click in “mmc /32” option from the
Search window and select “Run as administrator” option:
o mmc /32
o This will open a new 32-bit version of MMC (MMC32).
• From MMC console, go to File menu and select the “Options…” option
134
o In the text box, replace “Console1” for “BizTalk Administration Console”
o In the Console mode combo box, select “User mode – full access”
o Confirm that the option “Do not save changes to this console” is unchecked
• From MMC console, go to the File menu and select the “Add/Remove Snap-in…” option
• From the “Add or Remove Snap-ins” window, add the following snap-ins and then click Ok
o Microsoft BizTalk Server Administration
o BizTalk Health Monitor
o You can add the snap-ins by selecting them from the “Available snap-ins” list and click “Add >”
o Is recommend that you respect the order present in the “Selected snap-ins” list as shown in the picture
above
• This will generate a new MMC for us which contains both the BizTalk Server Administration and BizTalk Health
Monitor. By now, your new MMC which shows both the BizTalk Server Administration and BizTalk Health Monitor
is ready
136
Now you might want to save this as a new .msc file, so that you don’t have to repeat these steps again. But, before we
complete the creation process of the “new” BizTalk Administration Console, I recommend that you navigate to the
BizTalk Server Installation folder:
This is because we will save the “new” BizTalk Administration Console as “BTSmmc.msc”, so that you don’t need to
create new shortcuts or having different ways to access the BizTalk Administration Console. However, this step is
optional!
• From MMC console, go to File menu and select “Save As…” option:
o Give a name and then save it.
▪ Access to BizTalk Server Installation folder
• C:\Program Files (x86)\Microsoft BizTalk Server 2020
▪ Save the file as “BTSmmc.msc”
From next time onwards, when you open the BizTalk Server Administration Console, the “new” BizTalk Administration
Console will be incorporated with the BizTalk Health Monitor.
You can download the standalone version of BHM from Microsoft Download Center here: BizTalk Health Monitor
But SSO also can keep your own application configuration data in the SSO database. Let’s say the usual configuration
that we normally keep in a configuration file (“app.config”). One of the great and useful tools that we normally use for
archiving this is a custom tool originally created by Richard Seroter, the: SSO Config Data Store Tool.
However, since 2009 Microsoft released an MMC snap-in to tackle this exact issue. The 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
environments.
• Unzip the SSOConfigurationMMCSnapIn.zip file available from the Microsoft web site
• This file is composed of three zip files, so after unzipping the first file you should unzip also the
SSOMMCSnapInSetup.zip file
• Run the setup.exe or SSOMMCSnapInSetup.msi file as Administrator
• In the Welcome to the SSO Application Configuration Setup Wizard page, click “Next”
• In the Enter Company Name page, enter the name of your company and click “Next”
• In the Confirm Installation page, click “Next” to install the SSO Application Configuration MMC Snap-In
138
• In the Installation Complete page, click “Close”
However, unfortunately, this tool will not work properly in BizTalk Server 2020, and we need to apply a fix to it. At 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:
To fix this issue, I recompiled the SSOMMCSnapIn.dll using the latest version of
“Microsoft.EnterpriseSingleSignOn.Interop.dll” available with BizTalk Server 2020. You can download it at Microsoft
TechNet Gallery: BizTalk Server 2013 R2: Fix for SSO Configuration Application MMC Snap-In.
To solve the issue, you just need to overwrite 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.
Configure BizTalk Jobs History (Microsoft SQL Server Agent job history log)
Have you ever noticed that you never have a log history of the Monitor BizTalk Server job?
The reason why this happens is that BizTalk Server is shipped out with a total of 13 SQL Agent jobs. Most of them are
running each minute, some exceptions are for example the Monitor BizTalk Server job that by default occurs every
week on Sunday at 00:00:00 and the BizTalk Server Backup job that occurs every 15 minutes.
• We rarely inspect our environment during the weekend; only in critical situations or customers that have a 24x7
administration team
• By default, the Microsoft SQL Server Agent job history log is configured to
o “Limit size of job history log” with a maximum of 1000 rows
140
o And “Maximum job history row per job” with 100 rows
This means that a few minutes after the Monitor BizTalk Server job run successfully or unsuccessfully, its history is
overwritten with the row log history of the remaining 12 jobs. Therefore, never expect to have the history of this job
on Monday, when you arrive at 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)
Like any other system, all BizTalk Server databases should be backed up and BizTalk Server provides an out-of-the-box
job for accomplishing that; the Backup BizTalk Server (BizTalkMgmtDb) job.
This job makes both Full and Log backups. By default, the Backup BizTalk Server job performs a full backup once a day
and performs log backups every 15 minutes. This means that once the full backup is performed you need to wait 24
hours before it to will automatically do another full backup of the BizTalk Server databases… even if you try to manually
run the job, it will only make the backups of the log files.
But sometimes we need, for several reasons, to have the ability and the possibility to force a full backup:
• We will have some maintaining plan on the server, or apply a new configuration, and we want to back up the
environment
• Or simply, we will install a new integration application and again we want to have a backup in this exact moment
Each company has their own policies. So again, for several reasons, we sometimes need to force a full backup of all
BizTalk Server databases.
142
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 in the 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.
All BizTalk Admins know this (if they don’t know, they should!), however sometimes we need to rely on DBA Admins
to perform this task and do not misunderstand me, I have nothing against DBA’s! All the BizTalk Administration teams
should be composed of several elements with different skills: DBA Admins, network admins, Sys Admins and BizTalk
Admins…, each playing their own role. But sometimes, a DBA doesn’t really understand the BizTalk infrastructure and
the BizTalk Administrator should have an important role in advising and helping them (like in other situations it will be
the opposite).
Because this is not a day by day task, people tend to forget all the steps and sometimes they will create custom scripts
to perform this task, but 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 back up the BizTalk Server databases only if the SQL Server service is
stopped and if all BizTalk Server processes are stopped
So, to help one of my DBA teams, I ended up creating this job that is composed of two steps:
NOTE : Of course, this custom job should be disabled and manually executed only when you need it!
These tables are holding all the transaction marks (they are actually timestamps in a string format), set to a specific
database, created by the third step (MarkAndBackUpLog) of the ‘Backup BizTalk Server’ job. This step,
MarkAndBackupLog, is responsible for marking the logs for backup, and then backing them up. So, each time this step
runs, by default each 15 minutes, a new record containing a string is stored in that table, with the following naming
convention:
• Log_<yyyy>_<MM>_<dd>_<HH>_<mm>_<ss>_<fff>
where:
Again, these marks are timestamps in which the Log backups were set to be made. Example:
• BTS_2020_03_30_14_15_01_327
Unfortunately, BizTalk has no out-of-the-box possibilities to clean up these tables. The normal procedure is to run the
terminator tool (that is now included in the BizTalk Health Monitor snap-in) to clean it up.
144
BizTalk Terminator, which is now part of BizTalk health Monitor, is an excellent tool that allows common BizTalk
problems to be addressed by scripts which are provided by the BizTalk Team from Microsoft. But, the tools needs to
be used carefully and by users who know what they are doing.
Although most of the times this is an extremely useful tool and our friend, in this particular operation/situation, using
this tool is not really the best option, for the following two reasons:
• Using this tool means that we need to stop our environment, i.e., downtime in our integration platform
• If we look at the description of this “PURGE Marklog table” task, it says that this operation calls a SQL script that
cleans up everything in Marklog table – and maybe this is not a best practice!
You also need to analyze some important questions, in order to find and define some of the best practices to maintain
these tables:
Is this information (timestamps) useful for BizTalk Administrators? Should I clean all the data inside this tables or
should I maintain a history?
For the same reason that we maintain a Backup history in the Adm_BackupHistory table, controlled by the step “Clear
Backup History” of the ‘Backup BizTalk Server’ job, this information is important, for example, to keep an eye on the
backup/log shipping history records to see whether the backup is working correctly and data/logs are restored
correctly in the standby environment. The information on the MarkLog tables is also useful for the BizTalk
Administration team!
So, as long as the MarkLog tables have the same info (data from the same dates) as the backup job days to keep
parameter, you can safely delete the rest of the information.
As a best practice: you should respect the @DaysToKeep parameter that is specified in the “Clear Backup History” step
of the ‘Backup BizTalk Server’ job.
This is why, in my opinion, you shouldn’t use the Terminator tool to perform this operation!
The rows in the Marklog table are not “required” and can be cleaned whenever you want as long the BizTalk Backup
Job is not running.
The main challenge is how can we safely delete and maintain a history of all MarkLog tables according to some of the
best practices described earlier?
My first approach was creating a new job that, according to a schedule, would run a stored procedure to delete all the
unnecessary information in those tables. But I realized I could have two problems with this approach:
• I need to be sure that BizTalk Backup Job wasn’t running performing the backups
• I didn’t want to have two places to define the @DaysToKeep and I didn’t want to make unnecessary joins or
additional selects
So, I ended up recreating sp_DeleteBackupHistory (that is configured is the Backup BizTalk Server (BizTalkMgmtDb)
job in the last step) with a different name sp_DeleteBackupHistoryAndMarkLogsHistory and configure the job to run
this step:
USE [BizTalkMgmtDb]
GO
/****** Object: StoredProcedure [dbo].[sp_DeleteBackupHistoryAndMarkLogsHistory] Script Date:
22/05/2014 17:59:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[sp_DeleteBackupHistoryAndMarkLogsHistory] @DaysToKeep smallint = null,
@UseLocalTime bit = 0
AS
BEGIN
set nocount on
IF @DaysToKeep IS NULL OR @DaysToKeep <= 0
RETURN
/*
Only delete full sets
If a set spans a day such that some items fall into the deleted group and the other
don't don't delete the set
Delete history only if the history of full Backup exists at a later point of time
why: a history of a full backup is used in sp_BackupAllFull_Schedule to check if a
full backup of databases is required or not.
If the history of a full backup is not present, the job will take a full backup
irrespective of other options (frequency, Backup hour)
*/
DELETE [dbo].[adm_BackupHistory]
FROM [dbo].[adm_BackupHistory] [h1]
WHERE [BackupDateTime] < @PurgeDateTime
146
AND [BackupSetId] NOT IN ( SELECT [BackupSetId] FROM [dbo].[adm_BackupHistory] [h2] WHERE
[h2].[BackupSetId] = [h1].[BackupSetId] AND [h2].[BackupDateTime] >= @PurgeDateTime)
AND EXISTS( SELECT TOP 1 1 FROM [dbo].[adm_BackupHistory] [h2] WHERE [h2].[BackupSetId] >
[h1].[BackupSetId] AND [h2].[BackupType] = 'db')
/********************************************************************************************
********
Delete all the non referenced MarkLog rows in the BizTalk group.
These rows are not removed by default.
The logic for cursors and real server name is "stolen" from the BizTalk procedure
sp_MarkBTSLogs.
The cursor iterates all the databases that are backed up by BizTalk.
****************************************************************************************************
/
declare
@localized_string_sp_DeleteBackupHistoryAndMarkLogsHistory_Failed_sp_GetRemoteServerNameFailed
nvarchar(128)
set
@localized_string_sp_DeleteBackupHistoryAndMarkLogsHistory_Failed_sp_GetRemoteServerNameFailed =
N'sp_GetRemoteServerName failed to resolve server name %s'
declare @localized_string_sp_DeleteBackupHistoryAndMarkLogsHistory_Failed_Deleting_Mark
nvarchar(128)
set @localized_string_sp_DeleteBackupHistoryAndMarkLogsHistory_Failed_Deleting_Mark =
N'Failed running the deleting mark log proc on %s'
/* Create a cursor */
DECLARE BackupDB_Cursor insensitive cursor for
SELECT ServerName, DatabaseName
FROM admv_BackupDatabases
ORDER BY ServerName
open BackupDB_Cursor
fetch next from BackupDB_Cursor into @BackupServer, @BackupDB
WHILE (@@FETCH_STATUS = 0)
BEGIN
-- Get the proper server name
EXEC @ret = sp_GetRemoteServerName @ServerName = @BackupServer, @DatabaseName =
@BackupDB, @RemoteServerName = @RealServerName OUTPUT
close BackupDB_Cursor
deallocate BackupDB_Cursor
GOTO DONE
FAILED:
SET @ret = -1
RAISERROR( @errorDesc, 16, -1 )
GOTO DONE
DONE:
RETURN @ret
END
Special thanks to Mikael Sand, Tord Glad Nordahl, Rui Romano and Pedro Sousa for the feedback and for being co-
authors for the implementation of the logic of this job.
The script can be found and downloaded on Microsoft TechNet Gallery: BizTalk Server: Cleaning MarkLog Tables
According to Some of the Best Practices.
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 Hosts and Host Instances:
• BizTalkServerApplication: This is the default Host and Host Instance, created during configuration, that will do all
the work in 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) It is also used for
processing orchestrations and tracking.
148
• BizTalkServerIsolatedHost: The logical container for HTTP, WCF (BasicHttp, CustomIsolated, WebHttp, and
WSHttp) and SOAP Receive Handlers.
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, 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.
In turn, a host instance is the physical instance of a host on a computer running BizTalk Server. Each host instance
belongs to exactly one host and the service account of the host instance belongs to the security group of the host. The
security group may be used to grant permissions to physical resources such as databases for use by any host instance
in the host. Host instances have the following characteristics:
• Host instances running on the servers are the physical containers of BizTalk objects
• You create a host instance when you map a server to a host
• Multiple host instances (of different hosts) can exist on a server
NOTE : After you create a host (a logical container), you can add physical BizTalk servers (host instances) to
the host. You cannot add a BizTalk server to the same host more than once. A single host instance can be
added to multiple hosts. More about hosts here.
An adapter handler is an instance of a BizTalk host in which the adapter code runs. When you specify a send or receive
handler for an adapter, you are specifying which host will run the adapter code. An adapter handler is responsible for
executing the adapter and contains properties for a specific instance of an adapter. A default BizTalk Server
configuration will create adapter handlers for all the installed adapters, but you may want to create additional adapter
handlers for purposes of load balancing or to provide process isolation for a particular adapter handler.
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 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 the computer resources (such as CPU, memory, threads), so you need to be
careful.
150
Normally we read that we need to create at least 4 hosts: 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 that will run in 32-bits because the FTP adapter, the SQL adapter
(deprecated), the POP3 adapter and the MIME Decoder in 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. This
movement of tracking data has an impact on the performance of other BizTalk artifacts that are running in the
same host. Thus, you should use a dedicated host that does nothing but host tracking.
o Only the option “Allow Host Tracking” must be selected, because we only will use this host for tracking.
• BizTalkServerReceiveHost: All options (“Allow Host Tracking”, “32-bits only” or “Make this default host in the
group”) should be unselected. This host will be responsible for processing messages after they are picked up in a
receive location. When a host contains a receiving item, such as a receive location (with a pipeline), the message
decoding and decrypting occurs in a pipeline within this host.
o All receive handlers, except the isolated ones, like SOAP, HTTP, WCF-BasicHttp, WCF-WsHttp or WCF-
CustomIsolated and 32-bit adapters (FTP, SQL, and POP3) will be configured for this host. This will also
mean that all receive locations will run in this host.
• BizTalkServerReceive32Host: has the same goal as the previous host, however this must have the “32-bits only”
option selected so that we can run the 23-bits adapters.
o The receive handlers for the FTP, SQL and POP3 adapters will be configured for this host.
• BizTalkServerSendHost: All options (“Allow Host Tracking”, “32-bits only” or “Make this default host in the group”)
should be unselected. This host will be responsible for processing messages before they are sent out to the send
port. When a host contains a sending item, such as a send port, the message signing and encryption occurs in a
pipeline within this host.
o All send handlers, except 32-bit adapters, like the native SQL and FTP adapter, will be configured for this
host. This will mean also that all send ports will run in this host.
• BizTalkServerSend32Host: has the same goal as the previous host, however this must have the “32-bits only”
option selected so that we can run the 32-bits adapters.
o The Send handlers for the FTP and SQL adapters will be configured for this host.
• BizTalkServerApplication: Only the option “32-bits only” should be selected in this host. This host will be
responsible for processing messages based on the instructions in orchestrations that need to run in 32-bits.
• BizTalkServerApplication64Host: Only the option “Make this default host in the group” should be selected in this
host. This host will be responsible for processing messages based on the instructions in all or most common
orchestrations.
NOTE : You can create other Application Hosts if you want to separate processes based on application logic.
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.
• Press the “Windows key” to switch to the Start screen and type “Power Plan” and click on the “Choose a power
plan” option from the Search menu
• From the power plan page, choose the High Performance option
152
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.
• Parts Table: When the message size is smaller than the dimensions of a data page that is 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
You can use the following settings sample that in your environment:
When I was analyzing my BizTalk environment with BizTalk Server Best Practice Analyzer tool, a warning appeared that
caught my attention:
In the scenario described in this paper, we should apply the following TCP/IP settings:
Check and if necessary, increase the ephemeral ports and reduce the TCP re-use timeout setting
154
How to Disable Privilege Attribute Certificate (PAC)
The Privilege Attribute Certificate (PAC) is a function invoked within the Windows security system when you log on to
a system utilizing Kerberos. It is a network authentication protocol.
The Kerberos Privilege Attribute Certificate (PAC) contains all the group memberships for the security principal
requesting to access to a resource. PAC validation means a more secure environment, so why should be disabled?
When you run a high-volume server program on a domain member that uses Kerberos to authenticate users, you
experience a delay in the user authentication process. Additionally, you notice an increase in the remote procedure
call (RPC) traffic between the domain controller that uses the Net Logon RPC interface and the server. This problem
occurs because the Kerberos client verifies the Privilege Attribute Certificate (PAC) signature in the Kerberos ticket by
using the domain controller. The Kerberos client performs this verification to prevent PAC spoofing. The increased
network traffic is generated by the RPC requests that are part of this verification process.
How to Check and (if necessary) increase the ephemeral ports and reduce the TCP re-use timeout setting
When a client initiates a TCP/IP socket connection to a server, the client typically connects to a specific port on the
server and requests that the server responds to the client over an ephemeral, or short-lived, TCP or UDP port.
Under certain conditions, it is possible that the available ports in the default range will be exhausted. If this occurs,
the following symptoms may be observed:
To verify that one or more client applications are not generating excessive TCP/IP socket connections, perform the
following on the BizTalk servers in the group:
If less than 3000 ephemeral ports are currently in use, then it’s fine. (Original source: Recommended Platform
Configuration for BizTalk Server by Abdul Rafay)
Or you can view the dynamic port range by using the following netsh commands:
On all BizTalk servers running on Windows Server 2008 and later, there are 16383 ports (port 49152 to port 65535),
approximate times more ports than the default ports number in Windows Server 2003. Microsoft recommends that
you only increase the ephemeral ports if the default range is not enough. However, if you determine that additional
dynamic ports are needed, you can also use netsh command to modify these settings, as follows:
This command sets the dynamic port range for TCP. The start port is number, and the total number of ports is a range.
Example:
These sample commands set the dynamic port range to start at port 10000 and to end at port 11000 (1000 ports).
Important notes:
156
About BizTalk360:
BizTalk360 is a one platform tool for Microsoft BizTalk Server Operation, Monitoring, and Analytics. There are over
50 features targeted towards operations and monitoring of BizTalk Server in BizTalk360, making it an invaluable tool
for using Microsoft BizTalk server. Time and time again, we came across the same problem each customer was
having administering, operating, and monitoring their BizTalk environments. The default tooling (like BizTalk Admin
Console) lacked some enterprise qualities like security, auditing, analytics, monitoring capabilities, and so on. It also
demanded a high level of BizTalk knowledge to do the very basic things. Majority of the customers (specifically those
who could afford) ended up building their own custom management and monitoring solutions. That’s when we built
a generic management, monitoring, and analytics solution for BizTalk Server and make it affordable to each BizTalk
Server customer.