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
Copy file name to clipboardExpand all lines: README.md
+33-1Lines changed: 33 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -213,10 +213,42 @@ If no problems are found, it'll tell you that too. That's one of our favorite fe
213
213
Common sp_BlitzFirst parameters include:
214
214
215
215
*@Seconds = 5 by default. You can specify longer samples if you want to track stats during a load test or demo, for example.
216
-
*@CheckProcedureCache = 0 by default. When set to 1, this outputs the most resource-intensive queries during the time span. The data is calculated using sys.dm_exec_query_stats, which is a lightweight way of doing things (as opposed to starting up a trace or XE session). We don't turn this on by default because it tends to produce a lot of end user questions.
217
216
*@ShowSleepingSPIDs = 0 by default. When set to 1, shows long-running sleeping queries that might be blocking others.
218
217
*@ExpertMode = 0 by default. When set to 1, it calls sp_BlitzWho when it starts (to show you what queries are running right now), plus outputs additional result sets for wait stats, Perfmon counters, and file stats during the sample, then finishes with one final execution of sp_BlitzWho to show you what was running at the end of the sample.
219
218
219
+
### Logging sp_BlitzFirst to Tables
220
+
221
+
You can log sp_BlitzFirst performance data to tables and then analyze the results with the Power BI dashboard. To do it, schedule an Agent job to run sp_BlitzFirst every 15 minutes with these parameters populated:
222
+
223
+
*@OutputDatabaseName = typically 'DBAtools'
224
+
*@OutputSchemaName = 'dbo'
225
+
*@OutputTableName = 'BlitzFirst' - the quick diagnosis result set goes here
All of the above OutputTableName parameters are optional: if you don't want to collect all of the stats, you don't have to. Keep in mind that the sp_BlitzCache results will get large, fast, because each execution plan is megabytes in size.
232
+
233
+
Then fire up the [First Responder Kit Power BI dashboard.](https://www.brentozar.com/first-aid/first-responder-kit-power-bi-dashboard/)
234
+
235
+
### Logging Performance Tuning Activities
236
+
237
+
On the Power BI Dashboard, you can show lines for your own activities like tuning queries, adding indexes, or changing configuration settings. To do it, run sp_BlitzFirst with these parameters:
238
+
239
+
*@OutputDatabaseName = typically 'DBAtools'
240
+
*@OutputSchemaName = 'dbo'
241
+
*@OutputTableName = 'BlitzFirst' - the quick diagnosis result set goes here
242
+
*@LogMessage = 'Whatever you wanna show in the Power BI dashboard'
243
+
244
+
Optionally, you can also pass in:
245
+
246
+
*@LogMessagePriority = 1
247
+
*@LogMessageFindingsGroup = 'Logged Message'
248
+
*@LogMessageFinding = 'Logged from sp_BlitzFirst' - you could use other values here to track other data sources like DDL triggers, Agent jobs, ETL jobs
249
+
*@LogMessageURL = 'https://OurHelpDeskSystem/ticket/?12345' - or maybe a Github issue, or Pagerduty alert
250
+
*@LogMessageCheckDate = '2017年10月31日 11:00' - in case you need to log a message for a prior date/time, like if you forgot to log the message earlier
0 commit comments