MSDTC
– Microsoft Distributed Transaction.
I had
requirement to configure Azure Virtual machine with SQL Server 2008 R2 and One
Azure Virtual machine as an application server having few sites hosted on it.
Azure virtual machine app server hosted application should be able to connect
to SQL server and run SQL queries with transactions. Unfortunately transaction
queries were not working in my environment set up.
The problem
is, for transaction to work between SQL server and application server you need
to have MSDTC to be configured on both machines. Everywhere I read through many
posts that for configuring MSDTC, settings related to AD DC (domain controller)
is required. However my azure virtual machines were not in any domain neither
any one of them was treated as DC.
Hence
I tried to configure MSDTC on azure virtual machines without domain
configuration and it was successful.
Following
steps will guide through the steps required to enable MSDTC on Azure virtual
machines. Please note that the azure virtual machines do not have any domain
configured on them neither they are not part of any domain.
I
have 2 azure virtual machines with following configuration –
1.
SQL Server 2008 R2
2.
Windows Server 2008 R2 – call it as app server
Now I
need to configure MSDTC on SQL server and app server.
At
first you need to configure Azure virtual network as per the guidelines
mentioned at this post.
Then
provision Azure virtual machines with above configuration using the steps
mentioned at this post in the virtual network you created above.
Now
RDP to both Azure Virtual machines from the steps mentioned in this post.
Then log
in to App server and follow below steps.
***MSDTC configuration***
Select
Open Control Panel -> System and Security -> Allow a program through
windows firewall option as shown below.