Groups | Blog | Home
all groups > sql server (alternate) > july 2004 >

sql server (alternate) : MSDTC is unavailable.


tperovic
7/20/2004 8:24:26 PM
The following code:

DECLARE @tsql varchar(1000)
CREATE TABLE #Test (...)
SET @tsql = 'SELECT * FROM OPENQUERY(MyDataSource, ...)'
INSERT INTO #Test EXEC(@tsql)

generates the following error message at the insert statement:

Server: Msg 8501, Level 16, State 3, Line 4
MSDTC on server 'MyComputer' is unavailable.

Why?

Thanks,
Tony Perovic
Compumation, Inc.

tperovic
7/20/2004 8:27:18 PM
Starting the DTC service caused the problem to go away but why does it need
it?

[quoted text, click to view]

Erland Sommarskog
7/20/2004 9:57:11 PM
tperovic (tonyperovic@yahoo.com) writes:
[quoted text, click to view]

Because you call the other server in the context of a transaction,
defined by the INSERT statement.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
AddThis Social Bookmark Button