[dba-SQLServer] Visual Studio 2008: MSDTC on server 'servername' is unavailable (Solution)

Gustav Brock Gustav at cactus.dk
Sun Feb 10 11:14:00 CST 2008


Hi all

When you try to connect to a linked database on a remote server, you will probably succeed.
However, when you try to preview the data (using the GetData.. method), you may receive this message just as data are to be retrieved:

  MSDTC on server 'servername' is unavailable

I found the solution here:

  http://geekswithblogs.net/narent/archive/2006/10/09/93544.aspx 

<quote>
Control Panel > Adminstrative Tools > Component Services > Computers > 
(right click) My Computer > Run MS DTC

If you have the application and the SQL Server Data base in two different machines you must do that also

Control Panel > Adminstrative Tools > Component Services > Computers > 
(right click) My Computer > Properties > MS DTC (TAB) > allow remote access 
</quote>

In my case, the MS DTC service was running - I just had to touch it as described to get it working.
Somewhat strange, I think, but who cares.

Also, I modified the hosts and lmhosts.sam files to include the name lookup of the remote server as this is not a server with a public URL, but I'm not sure if that really is necessary as VS previously was perfectly able to preview a table of a normal database (but not of a linked) on that same server.

hosts file:
xxx.xxx.xxx.xxx	servername		# Description of server

lmhosts.sam file:
xxx.xxx.xxx.xxx	servername	#PRE	#Description of server

/gustav





More information about the dba-SQLServer mailing list