Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Stored procedure against a linked server 1

Status
Not open for further replies.

StevenK

Programmer
Jan 5, 2001
1,294
GB
Not sure if anyone will be able to help us with this one ... :(
We're developing an application using Visual Studio .NET (C#) and are working against a SQL Server database.
One of our stored procedures makes use of a dynamic SQL cursor.
In one instance we are working with data in one of the tables in the current database (where the connection is running) and in another we are accessing data from a linked server - i.e. SELECT -- FROM [SERVER2].Database1.dbo.Table1
When we try and execute the stored procedure through C# code we get errors indicating that 'MSDTC on server SERVER1 is not available'.
The code fails to complete.
What are we missing ? (to allow the distributed query to run).
Any help would be appreciated.
Thanks,
Steve
 
I think you need to loopback the linked servers.
Loopback servers are useful when testing an application that uses distributed queries on a single server network and it is not allwed in the distributted transaction.
-obislavu-
 
I'm pretty sure that all you need to do is start the MSDTC service.

Launch your SQL Server Service Manager, select "Distributed Transaction Coordinator" and click start. That should resolve your problem.

-----------------------------------------------
"The night sky over the planet Krikkit is the least interesting sight in the entire universe."
-Hitch Hiker's Guide To The Galaxy
 
Thanks.
Starting the 'Distributed Transaction Coordinator' has solved the issues. :)
Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top