SQL Server Monitoring and Performance
SQL Server Monitoring and Performance
Performance
1
p. 1
What We’re Going to Cover
Overview
Monitoring
• Chapter • Understanding
Introduction and Using the
• Tools for DMVs
Monitoring • PerfMon
• SQL Server • Data Collector
Profiler
p. 2
Chapter Introduction
p. 3
What We’re Going to Cover
Overview
Monitoring
• Chapter • Understanding
Introduction and Using the
• Tools for DMVs
Monitoring • PerfMon
• SQL Server • Data Collector
Profiler
p. 4
Tools of Performance Monitoring
p. 5
Tools of Performance Monitoring
p. 6
In the next video…
p. 7
Chapter 9: Monitoring and
Performance
8
p. 8
What We’re Going to Cover
Overview
Monitoring
• Chapter • Understanding
Introduction and Using the
• Tools for DMVs
Monitoring • PerfMon
• SQL Server • Data Collector
Profiler
p. 9
SQL Server Profiler
p. 10
SQL Server Profiler
p. 11
SQL Server Profiler
p. 12
SQL Server Profiler
p. 13
SQL Server Profiler
p. 14
SQL Server Profiler
p. 15
SQL Server Profiler
p. 16
SQL Server Profiler
p. 17
In the next video…
p. 18
Chapter 9: Monitoring and
Performance
19
p. 19
What We’re Going to Cover
Overview
Monitoring
• Chapter • Understanding
Introduction and Using the
• Tools for DMVs
Monitoring • PerfMon
• SQL Server • Data Collector
Profiler
p. 20
Dynamic Management Views
p. 21
Tools of Performance Monitoring
Reminder…
Perf Data
Profiler DMVs
Mon Coll.
Provides “live”, real-time reporting?
p. 22
Dynamic Management Views
p. 23
Dynamic Management Views
p. 24
Dynamic Management Views
p. 25
Dynamic Management Views
p. 26
DMV and DMF Query
p. 27
DMV and DMF Query Results
p. 28
Database Category
• Database category:
– 16+ DMVs and DMFs
p. 29
In the next video…
p. 30
Chapter 9: Monitoring and
Performance
31
p. 31
What We’re Going to Cover
Overview
Monitoring
• Chapter • Understanding
Introduction and Using the
• Tools for DMVs
Monitoring • PerfMon
• SQL Server • Data Collector
Profiler
p. 32
Dynamic Management Views
p. 33
Database Category
• Database category:
– 16+ DMVs and DMFs
p. 34
Database Category
p. 35
Database Category
p. 36
Database Category
p. 37
In the next video…
p. 38
Chapter 9: Monitoring and
Performance
39
p. 39
What We’re Going to Cover
Overview
Monitoring
• Chapter • Understanding
Introduction and Using the
• Tools for DMVs
Monitoring • PerfMon
• SQL Server • Data Collector
Profiler
p. 40
Dynamic Management Views
p. 41
Execution/Session Category
• Execution/Session category:
– 20+ DMVs and DMFs
p. 42
Execution/Session Category
p. 43
Execution/Session Category
p. 44
Execution/Session Category
p. 45
Return 50 most-run queries
p. 46
Return 50 most-run queries
p. 47
Execution/Session Category
p. 48
Execution/Session Category
p. 49
In the next video…
p. 50
Chapter 9: Monitoring and
Performance
51
p. 51
What We’re Going to Cover
Overview
Monitoring
• Chapter • Understanding
Introduction and Using the
• Tools for DMVs
Monitoring • PerfMon
• SQL Server • Data Collector
Profiler
p. 52
Dynamic Management Views
p. 53
IO Category
• IO category:
– 4+ DMVs and DMFs
p. 54
IO Category
p. 55
IO Category
• sys.dm_io_virtual_file_stats
returns several columns:
Column Description
sample_ms Milliseconds since server was restarted
num_of_reads Physical reads of objects in database file
num_of_bytes_read Large textual-based columns will affect this greatly
io_stall_read_ms Total time a user process waited for IO to this file
num_of_writes, Database write activity
num_of_bytes_written,
io_stall_write_ms
io_stall Total amount of waits reading /writing to this file
p. 56
IO Category
p. 57
IO DMF
p. 58
IO DMF
p. 59
IO DMF
p. 60
OS Category
p. 61
OS Category
p. 62
OS Category
p. 63
OS Category
p. 64
OS Category
p. 65
OS Category
p. 66
In the next video…
p. 67
Chapter 9: Monitoring and
Performance
68
p. 68
What We’re Going to Cover
Overview
Monitoring
• Chapter • Understanding
Introduction and Using the
• Tools for DMVs
Monitoring • PerfMon
• SQL Server • Data Collector
Profiler
p. 69
OS Category
p. 70
OS Category
p. 71
OS Category
p. 72
OS Category
p. 73
OS Category
p. 74
OS Category
p. 75
OS Category
p. 76
OS Category
p. 77
OS Category
p. 78
OS Category
p. 79
Scary!
p. 80
OS Category
p. 81
OS Category
p. 82
In the next video…
p. 92
Chapter 9: Monitoring and
Performance
93
p. 93
What We’re Going to Cover
Overview
Monitoring
• Chapter • Understanding
Introduction and Using the
• Tools for DMVs
Monitoring • PerfMon
• SQL Server • Data Collector
Profiler
p. 94
Performance Monitor
p. 95
Performance Monitor
p. 96
Performance Monitor
p. 97
Performance Monitor
p. 98
Performance Monitor
p. 99
Performance Monitor
p. 100
Performance Monitor
p. 101
Performance Monitor
p. 102
Performance Monitor
p. 103
In the next video…
p. 104
Chapter 9: Monitoring and
Performance
105
p. 105
What We’re Going to Cover
Overview
Monitoring
• Chapter • Understanding
Introduction and Using the
• Tools for DMVs
Monitoring • PerfMon
• SQL Server • Data Collector
Profiler
p. 106
Performance Monitor
p. 107
Performance Monitor
p. 108
Performance Monitor
p. 109
Performance Monitor
p. 110
Disk Usage
p. 111
Disk Usage
p. 112
Disk Usage
Memory Page faults/sec “Some” page faults are normal; look for
consistently high numbers
p. 113
Disk Usage
p. 114
Disk Usage
p. 115
Disk Usage
p. 116
Disk Usage
p. 117
Disk Usage
p. 118
One Caveat
p. 119
A Final Caveat
p. 120
In the next video…
p. 121
Chapter 9: Monitoring and
Performance
122
p. 122
What We’re Going to Cover
Overview
Monitoring
• Chapter • Understanding
Introduction and Using the
• Tools for DMVs
Monitoring • PerfMon
• SQL Server • Data Collector
Profiler
p. 123
Data Collector
p. 124
Data Collector
p. 125
Data Collector
p. 126
Data Collector
p. 127
Data Collector
p. 128
Data Collector
p. 129
Data Collector
p. 130
Data Collector
• A disclaimer:
– Please test, test, test this prior to deploying in a
production environment
– This is version 1.0 software
– Easy to “over collect”
• 30GB of data collection in three days!
p. 131
Data Collector
p. 132
Data Collector
p. 133
In the next video…
p. 134
Chapter 9: Monitoring and
Performance
135
p. 135
What We’re Going to Cover
Overview
Monitoring
• Chapter • Understanding
Introduction and Using the
• Tools for DMVs
Monitoring • PerfMon
• SQL Server • Data Collector
Profiler
p. 136
Data Collector
p. 137
Data Collector
p. 138
Data Collector
p. 139
Data Collector
p. 140
Data Collector
p. 141
Data Collector
p. 142
Data Collector
p. 143
Data Collector
p. 144
Data Collector
p. 145
In the next video…
p. 146
Chapter 9: Monitoring and
Performance
147
p. 147
What We’re Going to Cover
Overview
Monitoring
• Chapter • Understanding
Introduction and Using the
• Tools for DMVs
Monitoring • PerfMon
• SQL Server • Data Collector
Profiler
p. 148
Data Collector
p. 149
Data Collector
p. 150
Data Collector
p. 151
Data Collector
p. 152
Data Collector
p. 153
Data Collector
p. 154
Data Collector
p. 155
In the next video…
p. 156