dbTalk Databases Forums  

running stored procedure across linked server using cursor

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss running stored procedure across linked server using cursor in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mike Helmericks
 
Posts: n/a

Default 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.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.