SQL Server Events
Events analysis
The Events dashboard shows the number of events that occurred on the SQL
Server instance during the selected time range.
The top chart breaks events down by type:
- Errors
- Deadlocks
- Blocking
- Timeouts
Expand a row to view a chart for that event type by database and a list of
individual events. Click a row’s hyperlink to open a detailed dashboard for
that event type, where you can inspect the event details.
1 - Errors
Details about errors occurring on the instance
Expand the “Errors” row to see a chart that shows the number of errors per database over time.
Below the chart, a table lists individual error events with these columns: timestamp,
database name, application name, host name, username, severity, error number, and error message.
Only errors with severity >= 16 are included. Error number 17830 is excluded because it
can occur very frequently.
Use the filter controls in the column headers to filter the table. Click a column header to
sort by that column: each click cycles through ascending, descending, and no sort.
Click the link in the Event Sequence column to open the error details dashboard.
It shows the full error message and, when available, the SQL statement that caused the error.
The SQL text may be unavailable for some error types.
2 - Deadlocks
Information on deadlocks
Expand the “Deadlocks” row to view a chart that shows the number of deadlocks
for each database.
SQL Server detects a deadlock when two or more sessions block each other so none
can proceed. To resolve the conflict, SQL Server selects a victim and terminates
that session’s statement. QMonitor captures deadlock events and stores the deadlock
graph (XML) for analysis.
Under the chart is a list of deadlock events with columns for time, sequence,
database, and user name. Use the column filters and sort controls to filter and
sort the table.
Click a row to open the Deadlock detail dashboard.
The Deadlock XML panel displays the deadlock graph in XML format. That
graph contains nodes for processes, resources, execution stacks and inputbuf; documenting
every node is beyond the scope of this documentation.
The XML includes one or more nodes that identify the victim and the
participating processes, and that provide details about the resources and SQL
statements involved. Use the graph and statements to identify the conflict and to
find candidate fixes (indexing, query changes, or retry logic).
The bottom grid lists sessions that were running around the event time, giving a
quick overview of related activity. Use the buttons above the grid to set the
time window around the event from 1 to 15 minutes.
3 - Blocking
Blocking Events
Expand the “Blocking” row to view a chart that shows the number of blocking events
for each database.
Blocking events are raised by SQL Server when a session waits on a lock longer than
the blocked process threshold. By default the threshold is 0 (no events). The
QMonitor setup script sets the threshold to 10 seconds as a recommended starting
point. If you see too many events, increase the threshold. After you’ve resolved most
blocking events, you can experiment with lowering the threshold.
Under the chart is a list of blocking events with columns for time, sequence,
database, object ID, duration, lock mode, and resource owner type. Use the column
filters and sort controls to filter and sort the table.
Click a row to open the Blocking detail dashboard.
The top table in the detail view shows the same event information as the events
dashboard. The Blocking XML panel displays the blocked process report in XML format.
That report contains many nodes; documenting every node is beyond the scope of
this documentation.
The XML includes one or more nodes and one or more
nodes. These nodes identify the blocked and blocking processes
and provide details about the resources the blocked process was waiting on.
The bottom grid lists sessions that were running around the event time, giving a
quick overview of blocking and blocked processes. Use the buttons above the grid
to set the time window around the event from 1 to 15 minutes.
4 - Timeouts
Information on query timeouts
Expand the “Timeouts” row to view a chart that shows the number of timeouts
for each database.
Query timeouts occur when a client, application, or command exceeds its
configured timeout before the operation completes. QMonitor captures timeout
events and records the error text, session details, and, when available, the
SQL text.
Under the chart is a list of timeout events with columns for time, sequence,
database, duration, application, username and duration.
Use the column filters and sort controls to filter and sort the table.
Click a row to open the Timeout detail dashboard.
The top table in the detail view shows the same event information as the
events dashboard. The Timeout Statement panel displays the SQL statement found
int the timeout event. The SQL text may be unavailable for some event types.
The bottom grid lists sessions that were running around the event time, giving
a quick overview of related activity. Use the buttons above the grid to set
the time window around the event from 1 to 15 minutes.
Investigate frequent timeouts by reviewing the SQL, execution plan, and wait
types. Consider query tuning or indexing, increase client timeouts only after
identifying the root cause, or add retry logic where appropriate.