Distributed Transactions on Windows 2008 Systems – III

This is the final post on a series dedicated to the MSDTC configuration on a Windows Server environment.

so far we’ve covered these aspects:

  • Post I – How MSDTC works and relevant deployment scenarios and when do I need to perform additional configuration
  • Post II – Defining a port range for MSDTC so it can be managed on a firewall configuration and enabling TCP/IP transaction communications.

Recalling the scenario for this post, we assume:

  • static addressing of the hosts
  • no naming servers available
  • packet broadcast disabled
  • firewall between application hosts and database hosts

On these conditions, MSDTC will not work because it cannot translate the NetBIOS names of the participating hosts into their IP addresses. Even without naming servers, DTC might try to resolve the hosts names with a network packet broadcast, but for the sake of this example we assume it’s cut off by a firewall. Usually, even ICMP (ping) is cut off.

The remaining work around is to add address and name entries to a system file called “lmhosts”. The “lmhosts” file is a local text file that maps Internet Protocol (IP) addresses to NetBIOS names of remote servers with which you want to communicate. It’s similar to the regular “hosts” file but the latter one concerns general network lookup, like DNS replacement. The Lmhosts file is located in the “%SystemRoot%\System32\Drivers\Etc”.

So, the first step is to edit the “lmhosts” file and add entries for each of the remote hosts involved. It’s done adding a tab separated pair of IP address and NetBIOS name on each line. You can add the #PRE suffix to the lines so the host loads the lookups at boot time. For instance:

10.0.132.73 remote-mssql-host-1 #PRE
10.0.132.65 remote-mssql-host-2 #PRE

Afterwards, the TCP/IP connection properties need to be edited:

  • On the Windows host, open the Network and Sharing Center. Press the “Local Area Connection” link.

Network properties

  • Press the “Properties” button. On the new window select the “Internet Protocol Version 4” and press “Properties”.

TCPIP Properties

  • Press the “Advanced” button and select the WINS tab. Choose to enable LMHOSTS lookup and NetBIOS over TCP/IP.

LMHosts enabling

Press “OK” on all windows. Perform these steps, together with the ones mentioned on the previous posts and try your luck.

Hope this helps.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s