running stored procedure across linked server using cursor -
10-24-2005
, 05:52 PM
I am running sql server 2000 standard edition on 2 seperate servers. I have
created a stored proc that is using data from both servers. the servers are
linked correctly but when you use the begin transaction prior to the open
cursor statement you will recieve this error "Server: Msg 7391, Level 16,
State 1, Line 1 The operation could not be performed because
the OLE DB provider '%ls' does not support distributed transactions. [OLE/DB
provider
returned message: Distributed transaction error]" or most likely this error
"Server: Msg 8525, Level 16, State 1, Line 1
Distributed transaction completed. Either enlist this session in a new
transaction or the NULL transaction. "
I have seen the fix when one of the servers is running sql server 7.0 both
of mine are running 2000 sp3 and windows 2003 server standard edition.
Through my testing I have went down many differnet roads. It appears that
this is only happening when both servers are runnign server 2003. Sinc eIhave
the same stored procedure running fine on another server that is server 2000
with linked servers of 2003.
In addition I have found that the error can be corrected if you move the
begin transaction or begin distributied transaction statement to the line
following the open cursor statement. It looks like the open cursor statement
is causing DTS to have issues even though it is only involved in a select
statement from teh remote/linked servers.
Anyone who can shed some insight as to why this may be happening would be
greatly appreciated. |