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
Checks for the existence of a table DBAtools.dbo.BlitzResults, creates it if necessary, then adds the output of sp_Blitz into this table. This table is designed to support multiple outputs from multiple servers, so you can track your server's configuration history over time.
@@ -114,16 +115,16 @@ Checks for the existence of a table DBAtools.dbo.BlitzResults, creates it if nec
114
115
115
116
#### Skipping Checks or Databases
116
117
117
-
```SQL
118
+
```tsql
118
119
CREATE TABLE dbo.BlitzChecksToSkip (
119
-
ServerName NVARCHAR(128),
120
-
DatabaseName NVARCHAR(128),
121
-
CheckID INT
120
+
ServerName NVARCHAR(128),
121
+
DatabaseName NVARCHAR(128),
122
+
CheckID INT
122
123
);
123
124
GO
124
125
INSERT INTO dbo.BlitzChecksToSkip (ServerName, DatabaseName, CheckID)
Checks for the existence of a table named Fred - just kidding, named DBAtools.dbo.BlitzChecksToSkip. The table needs at least the columns shown above (ServerName, DatabaseName, and CheckID). For each row:
@@ -396,7 +397,7 @@ Example calls:
396
397
397
398
Get information for the last hour from all sp_BlitzFirst output tables
398
399
399
-
```SQL
400
+
```tsql
400
401
EXEC sp_BlitzAnalysis
401
402
@StartDate = NULL,
402
403
@EndDate = NULL,
@@ -411,7 +412,7 @@ EXEC sp_BlitzAnalysis
411
412
412
413
Exclude specific tables e.g lets exclude PerfmonStats by setting to NULL, no lookup will occur against the table and a skipped message will appear in the resultset
413
414
414
-
```SQL
415
+
```tsql
415
416
EXEC sp_BlitzAnalysis
416
417
@StartDate = NULL,
417
418
@EndDate = NULL,
@@ -429,19 +430,19 @@ We are likely to be hitting some big tables here and some of these queries will
429
430
430
431
I have noticed that the Perfmon query can ask for a big memory grant so be mindful when including this table with large volumes of data:
431
432
432
-
```SQL
433
+
```tsql
433
434
SELECT
434
-
[ServerName]
435
-
,[CheckDate]
436
-
,[counter_name]
437
-
,[object_name]
438
-
,[instance_name]
439
-
,[cntr_value]
435
+
[ServerName]
436
+
, [CheckDate]
437
+
, [counter_name]
438
+
,[object_name]
439
+
,[instance_name]
440
+
,[cntr_value]
440
441
FROM [dbo].[BlitzFirst_PerfmonStats_Actuals]
441
442
WHERE CheckDate BETWEEN @FromDate AND @ToDate
442
443
ORDER BY
443
-
[CheckDate] ASC,
444
-
[counter_name] ASC
444
+
[CheckDate] ASC
445
+
, [counter_name] ASC;
445
446
```
446
447
447
448
[*Back to top*](#header1)
@@ -464,11 +465,11 @@ Parameters include:
464
465
465
466
An example run of sp_BlitzBackups to push data looks like this:
466
467
467
-
```
468
-
EXEC sp_BlitzBackups @PushBackupHistoryToListener = 1, -- Turn it on!
469
-
@WriteBackupsToListenerName = 'AG_LISTENER_NAME', -- Name of AG Listener and Linked Server
470
-
@WriteBackupsToDatabaseName = 'FAKE_MSDB_NAME', -- Fake MSDB name you want to push to. Remember, can't be real MSDB.
471
-
@WriteBackupsLastHours = -24 -- Hours back in time you want to go
468
+
```tsql
469
+
EXEC sp_BlitzBackups @PushBackupHistoryToListener = 1, -- Turn it on!
470
+
@WriteBackupsToListenerName = 'AG_LISTENER_NAME', -- Name of AG Listener and Linked Server
471
+
@WriteBackupsToDatabaseName = 'FAKE_MSDB_NAME', -- Fake MSDB name you want to push to. Remember, can't be real MSDB.
472
+
@WriteBackupsLastHours = -24 -- Hours back in time you want to go
472
473
```
473
474
474
475
In an effort to not clog your servers up, we've taken some care in batching things as we move data. Inspired by [Michael J. Swart's Take Care When Scripting Batches](http://michaeljswart.com/2014/09/take-care-when-scripting-batches/), we only move data in 10 minute intervals.
@@ -536,14 +537,15 @@ For information about how this works, see [Tara Kizer's white paper on Log Shipp
536
537
537
538
To check versions of any of the stored procedures, use their output parameters for Version and VersionDate like this:
0 commit comments