Supporting SQL Server 2008: The system_health session
Az extended event-ökre épülő dolog, ez, amelyet problémák esetén érdemes megnézni a szokásos logok mellett:
SELECT CAST (xest.target_data AS XML) FROM sys.dm_xe_session_targets xest JOIN sys.dm_xe_sessions xes ON xes.address = xest.event_session_address WHERE xes.name = 'system_health';
A háttérben fut egy extended event session, ami a gázosabb helyzetekben logol. Igaz, csak korlátozott méretekben és memóriában, de lehet benne hasznos infó.
Ezekről van benne infó:
* The sql_text and session_id for any sessions that encounter an error with severity >=20
* the sql_text and session_id for any sessions that encounter a “memory” type of error such as 17803, 701, etc (we added this because not all memory errors are severity >=20)
* A record of any “non-yielding” problems (you have sometimes seen these in the ERRORLOG as Msg 17883)
* Any deadlocks that are detected
* The callstack, sql_text, and session_id for any sessions who have waited on latches (or other interesting resources) for > 15 seconds
* The callstack, sql_text, and session_id for any sessions who have waited on locks for > 30 seconds
* The callstack, sql_text, and session_id for any session that have waited for an extended period of time for “external” waits or “pre-emptive waits”.
Jó tudni még, hogy az sql log könyvtárában vannak trc fájlok is, amelyek meg a már 2005 óta létező, háttérben futó default trace nyomait rögzíti. Ebben is lehetnek értékes morzsák hibakereséshez.