June 10, 2007 at 3:32 pm
Hi all,
we have a prod box onto which certain application is updating a database its getting connected through cursors but the problem is its blocking our maintenance job sp_updatestats.
any ideas....how to deal with situation I am curious whether actual command which is being executed on those cursors can be determined?
shnk
June 11, 2007 at 2:27 pm
You can capture the cursor code using SQL Profiler. It sounds like you have sp_updatestats running as a scheduled job. The next time it runs and you are experiencing the blocking, run sp_who2 and sp_lock so you have the process and locking/objectIDs to match up with the logic within the cursor. Is this your code or a 3rd party apps code? It may be helpful if you could post the entire cursor. You may find someone here on SSC that would help you re-write the cursor as a set based solution.
June 12, 2007 at 7:57 am
Can you simply rearrange your job schedule or the application run time so they don't conflict?
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply