You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Made sp_HumanEventsBlockViewer not error out when system_health is used. Updated documentation, printing, and debug output to reflect this. Also automatically selected event_file if no target type is specified for system_health, since our usual default of table is no good. Closeserikdarlingdata#617.
Copy file name to clipboardExpand all lines: sp_HumanEvents/README.md
+26-24Lines changed: 26 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -122,7 +122,9 @@ EXECUTE dbo.sp_HumanEvents
122
122
123
123
This was originally a companion script to analyze the blocked process report Extended Event created by sp_HumanEvents, but has since turned into its own monster.
124
124
125
-
It will work on any Extended Event that captures the blocked process report. If you need to set that up, run these two pieces of code.
125
+
It will work on any Extended Event that captures the blocked process report. If you need to set that up, run the next two pieces of code.
126
+
127
+
The system_health Extended Event works, but its blocked process report is much less comprehensive than the real thing. I do not allow logging to a table from this, because the set of columns and available data is too incomplete, and I don't want to juggle multiple table definitions.
| @session_name | sysname | name of the extended event session to pull from | extended event session name capturing sqlserver.blocked_process_report | keeper_HumanEvents_blocking |
178
-
| @target_type | sysname | target of the extended event session | event_file or ring_buffer | NULL |
179
-
| @start_date | datetime2 | filter by date | a reasonable date | NULL; will shortcut to last 7 days |
180
-
| @end_date | datetime2 | filter by date | a reasonable date | NULL |
181
-
| @database_name | sysname | filter by database name | a database that exists on this server | NULL |
182
-
| @object_name | sysname | filter by table name | a schema-prefixed table name | NULL |
183
-
| @target_database | sysname | database containing the table with BPR data | a valid database name | NULL |
184
-
| @target_schema | sysname | schema of the table | a valid schema name | NULL |
185
-
| @target_table | sysname | table name | a valid table name | NULL |
186
-
| @target_column | sysname | column containing XML data | a valid column name | NULL |
187
-
| @timestamp_column | sysname | column containing timestamp (optional) | a valid column name | NULL |
188
-
| @log_to_table | bit | enable logging to permanent tables | 0 or 1 | 0 |
189
-
| @log_database_name | sysname | database to store logging tables | a valid database name | NULL |
190
-
| @log_schema_name | sysname | schema to store logging tables | a valid schema name | NULL |
191
-
| @log_table_name_prefix| sysname | prefix for all logging tables | a valid table name prefix | 'HumanEventsBlockViewer' |
192
-
| @log_retention_days | integer | Number of days to keep logs, 0 = keep indefinitely | a valid integer | 30 |
193
-
|@help| bit | how you got here | 0 or 1 | 0 |
194
-
|@debug| bit | dumps raw temp table contents | 0 or 1 | 0 |
195
-
|@version| varchar | OUTPUT; for support | none; OUTPUT | none; OUTPUT |
196
-
| @version_date | datetime | OUTPUT; for support | none; OUTPUT | none; OUTPUT |
| @session_name | sysname | name of the extended event session to pull from | extended event session name capturing sqlserver.blocked_process_report, system_health also works| keeper_HumanEvents_blocking |
180
+
| @target_type | sysname | target of the extended event session | event_file or ring_buffer or table | NULL |
181
+
| @start_date | datetime2 | filter by date | a reasonable date| NULL; will shortcut to last 7 days |
182
+
| @end_date | datetime2 | filter by date | a reasonable date| NULL |
183
+
| @database_name | sysname | filter by database name | a database that exists on this server| NULL |
184
+
| @object_name | sysname | filter by table name | a schema-prefixed table name| NULL |
185
+
| @target_database | sysname | database containing the table with BPR data | a valid database name| NULL |
186
+
| @target_schema | sysname | schema of the table | a valid schema name| NULL |
187
+
| @target_table | sysname | table name | a valid table name| NULL |
188
+
| @target_column | sysname | column containing XML data | a valid column name| NULL |
0 commit comments