A few months ago I added an extended event to track blocked processes and deadlocks, with a file output to track occurrences.
Every now and again, I check the log file, but find that the extended event has stopped, when I "Start Session" again through SSMS, it picks up again and logs as expected.
How can I ensure that this runs 24/7?
Is it possibly failing somewhere and there's a log of errors that I'm unaware of?
Best Answer
It seems your Extended Event session is defined with
STARTUP_STATE=OFF
so it is not started automatically when SQL Server is restarted.Change the session to
STARTUP_STATE=ON
to ensure it's always running (unless stopped manually):