"Transport-level Error" using SQL Server Stored Procedure and Cursor -
i have created stored procedure auto follow
users , procedure on server. in database, there 20,000+ users. store procedure uses cursor.
i getting error a transport-level error has occurred when receiving results server. (provider: tcp provider, error: 0 - existing connection forcibly closed remote host.)"
this stored procedure .
declare @useridf int declare @userid int declare csrautofollow cursor select top (1) userid dbo.users isfuser = 1 order newid() open csrautofollow fetch next csrautofollow @useridf while @@fetch_status = 0 begin declare csrauto cursor select userid dbo.users isfuser null open csrauto fetch next csrauto @userid while @@fetch_status = 0 begin exec dbo.followunfollowuser @useridf,@userid,1 fetch next csrauto @userid end close csrauto deallocate csrauto fetch next csrautofollow @useridf end close csrautofollow deallocate csrautofollow
please let me know whether can improved.
"transport level error" means computer stored procedure called has lost network connectivity database server stored procedure lives on. has nothing code of procedure.
you need have network admin problem.
Comments
Post a Comment