Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Error Executing a stored procedure, with linked servers

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-11-30 : 11:04:37
Jared writes "Hello SQLTEAM.COM,
I am currently trying to execute a stored procedure on a server at the office that I work at. This SP then runs some select queries on a server in another state through a linked server connection. We are using the SQLOLEDB provider to link these two servers together. An example of one of the queries that are used in the stored procedure is:
"SET @Var = (Select COUNT(*)
FROM SRV.MyDB.dbo.MyTable
Where MyField = 1
AND MyField2 = @Var2)"

I then get a replied error:
"Server: Msg 7391, Level 16, State 1, Procedure MyStoredProcedure, Line ##
The operation could not be performed because the OLE DB provider 'SQLOLEDB' does not support distributed transactions.
[OLE/DB provider returned message: Distributed transaction error]"

So far looking at MS's documentation they say "If DTC, is not supported then re-write the code not to use it". I hope this is not the only answer and if it by chance is how is it possible to do so with no examples or reasoning how to. I would appreciate any help you could provide me.

Thank You,
Jared"
   

- Advertisement -