|
1 | 1 |
|
2 | 2 | -- SQL Server 2008 R2 Diagnostic Information Queries |
3 | 3 | -- Glenn Berry |
4 | | --- Last Modified: December 20, 2018 |
| 4 | +-- Last Modified: February 1, 2019 |
5 | 5 | -- https://www.sqlserverperformance.wordpress.com/ |
6 | 6 | -- https://www.sqlskills.com/blogs/glenn/ |
7 | 7 | -- Twitter: GlennAlanBerry |
|
15 | 15 | -- Please make sure you are using the correct version of these diagnostic queries for your version of SQL Server |
16 | 16 |
|
17 | 17 | --****************************************************************************** |
18 | | ---* Copyright (C) 2018 Glenn Berry, SQLskills.com |
| 18 | +--* Copyright (C) 2019 Glenn Berry, SQLskills.com |
19 | 19 | --* All rights reserved. |
20 | 20 | --* |
21 | 21 | --* For more scripts and sample code, check out |
@@ -457,7 +457,7 @@ ORDER BY avg_io_stall_ms DESC OPTION (RECOMPILE); |
457 | 457 |
|
458 | 458 | -- Recovery model, log reuse wait description, log file size, log usage size (Query 21) (Database Properties) |
459 | 459 | -- and compatibility level for all databases on instance |
460 | | -SELECT db.[name] AS [Database Name], db.recovery_model_desc AS [Recovery Model], |
| 460 | +SELECT db.[name] AS [Database Name], SUSER_SNAME(db.owner_sid) AS [Database Owner], db.recovery_model_desc AS [Recovery Model], |
461 | 461 | db.log_reuse_wait_desc AS [Log Reuse Wait Description], |
462 | 462 | ls.cntr_value AS [Log Size (KB)], lu.cntr_value AS [Log Used (KB)], |
463 | 463 | CAST(CAST(lu.cntr_value AS FLOAT) / CAST(ls.cntr_value AS FLOAT)AS DECIMAL(18,2)) * 100 AS [Log Used %], |
@@ -562,6 +562,7 @@ ORDER BY [CPU Rank] OPTION (RECOMPILE); |
562 | 562 | ------ |
563 | 563 |
|
564 | 564 | -- Helps determine which database is using the most CPU resources on the instance |
| 565 | +-- Note: This only reflects CPU usage from the currently cached query plans |
565 | 566 |
|
566 | 567 |
|
567 | 568 | -- Get I/O utilization by database (Query 25) (IO Usage By Database) |
@@ -1370,7 +1371,13 @@ ORDER BY bs.backup_finish_date DESC OPTION (RECOMPILE); |
1370 | 1371 | -- Have you done any backup tuning with striped backups, or changing the parameters of the backup command? |
1371 | 1372 |
|
1372 | 1373 |
|
1373 | | --- These three Pluralsight Courses go into more detail about how to run these queries and interpret the results |
| 1374 | +-- These five Pluralsight Courses go into more detail about how to run these queries and interpret the results |
| 1375 | + |
| 1376 | +-- SQL Server 2017: Diagnosing Performance Issues with DMVs |
| 1377 | +-- https://bit.ly/2FqCeti |
| 1378 | + |
| 1379 | +-- SQL Server 2017: Diagnosing Configuration Issues with DMVs |
| 1380 | +-- https://bit.ly/2MSUDUL |
1374 | 1381 |
|
1375 | 1382 | -- SQL Server 2014 DMV Diagnostic Queries Part 1 |
1376 | 1383 | -- https://bit.ly/2plxCer |
|
0 commit comments