473,387 Members | 1,540 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

MSDTC is unavailable.

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.
Jul 20 '05 #1
2 9732
Starting the DTC service caused the problem to go away but why does it need
it?

"tperovic" <to*********@yahoo.com> wrote in message
news:_b****************@newsread2.news.atl.earthli nk.net...
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.

Jul 20 '05 #2
tperovic (to*********@yahoo.com) writes:
Starting the DTC service caused the problem to go away but why does it
need it?
DECLARE @tsql varchar(1000)
CREATE TABLE #Test (...)
SET @tsql = 'SELECT * FROM OPENQUERY(MyDataSource, ...)'
INSERT INTO #Test EXEC(@tsql)


Because you call the other server in the context of a transaction,
defined by the INSERT statement.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: KO | last post by:
SQL Server Enterprise Manager could not start the service 'MSDTC' on server 'NTAS21'. 1722 - (The RPC server is unavailable) I Setup A publication on a server called NTAS4D, then Pushed The...
0
by: Gary | last post by:
All, I am experiencing an error using MSDTC with SQL Server 2000 on Windows 2003 server. The code in question is a stored procedure that does a query within a transaction using linked servers....
1
by: dgk | last post by:
I installed SQLServer2005 but I still get the message that MSDTC (transaction stuff) is unavailable. Any ideas how to fix it? Perhaps find a SQL Server group I guess.
1
by: sjoshi | last post by:
Hello I had a question reagrding MSDTC usage. I know that MSDTC will enlist each connection transactions as it's own (take ownership) and commit/abort accordingly. However I'm not sure what...
0
by: hafeez | last post by:
Hi, I am using SQL SERVER 2005 standard edition in windows xp environment. And remote system also have same SQL SERVER 2005 standard edition windows xp environment. I am using LINKED SERVER...
1
by: Jimbo | last post by:
I keep getting this error on my application server...what does it mean? The description for Event ID ( 0 ) in Source ( ODBC ) cannot be found. The local computer may not have the necessary...
3
by: =?Utf-8?B?YWJheWVy?= | last post by:
In short: I have an application using the CommittableTransaction class that works fine when run locally, but does not escalate to MSDTC when deployed to a Windows 2003 R2 server. More...
6
by: =?Utf-8?B?UGF1bCBQcmV3ZXR0?= | last post by:
Hi - I have 4 webservers in my webfarm. All Win2k3 web edition. Before yesterday, none of them were service packed. I have now applied SP2 to two of them, and I'm getting a very weird MSDTC...
5
by: =?Utf-8?B?QmlsbHkgWmhhbmc=?= | last post by:
I have two web server, one DB server with two Database. I used MS enterprise transaction with transfaction scope. How to config MSDTC between the web server and DB to make it work? any...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.