December 9, 2021 at 3:47 pm
I'm using dbcc trace in connection with sp_readerrorlog to detect deadlocks and display them respectively.
Should I automatically assume that deadlocks dissapear when sp_readerrorlog stops displaying 'deadlock-list' sections..
Thanks
December 9, 2021 at 4:56 pm
That I am not 100% certain on, but in my opinion - I would buy some sort of SQL monitoring tool. It will let you know when a deadlock occurs and you can deal with it.
Now, with your exact question, my understanding is that if the correct trace flags are on to log deadlocks in the error log, then if you stop getting "deadlocks" in the error log, no deadlock occurred... or something is preventing SQL from writing to the error log.
That being said, they don't just "disappear" - it may just be that the queries being run are not deadlocking yet, but still could in the future. A deadlock is an either-or thing - it either happened or it didn't. They don't "disappear". Once a deadlock happens, one or more of the queries will need to be rolled back and possibly re-run.
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
December 9, 2021 at 5:34 pm
I would pick Extended Events to monitor deadlocks
https://www.mssqltips.com/sqlservertip/5658/capturing-sql-server-deadlocks-using-extended-events/
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply