mwitthoft (1/10/2014)
I am battling a similar "self-restarting cursor" . The defect(a) occurs 100% on one server
(b) occurs 0% on another server
Pseudocode
Declare cursor as..
Open cursor
Fetch next
while @@FetchStatus
do stuff
FetchNext
--** right here, if it hits EndOfData, it just happily fetches First Row of Cursor and rolls on.
end
close cursor
Seems like there is a new bug in SQL Server, and it depends on some unknown aspect of how the server is configured.
First, there isn't enough to even try to help here. Second, I would start looking at finding a way to eliminate the cursor and replace it with a set-based process.