About the Author |
|
xvii | |
About the Technical Reviewer |
|
xix | |
Acknowledgments |
|
xxi | |
Foreword |
|
xxv | |
Chapter 1 Introduction to Healthy SQL |
|
1 | (18) |
|
|
1 | (3) |
|
|
2 | (1) |
|
|
3 | (1) |
|
|
3 | (1) |
|
|
4 | (3) |
|
|
5 | (1) |
|
|
6 | (1) |
|
Why Perform a Health Check? |
|
|
7 | (10) |
|
|
8 | (1) |
|
|
9 | (3) |
|
|
12 | (2) |
|
|
14 | (1) |
|
|
15 | (1) |
|
|
15 | (1) |
|
|
15 | (1) |
|
|
16 | (1) |
|
When to Perform a Health Check |
|
|
17 | (2) |
Chapter 2 Creating a Road Map |
|
19 | (24) |
|
Statistics and Performance |
|
|
19 | (3) |
|
|
19 | (1) |
|
Applying Real-World Principles of Statistics to Performance |
|
|
20 | (2) |
|
|
22 | (6) |
|
|
28 | (6) |
|
|
29 | (1) |
|
CPU, Memory, I/O, Locking, and Blocking |
|
|
30 | (1) |
|
Collecting Information from the System Catalog |
|
|
31 | (3) |
|
|
34 | (2) |
|
|
35 | (1) |
|
Over-allocation of Memory/CPU |
|
|
36 | (1) |
|
Best Practices: Says Who? |
|
|
36 | (4) |
|
Some Not-So Best Practices |
|
|
37 | (1) |
|
|
38 | (1) |
|
|
39 | (1) |
|
|
40 | (1) |
|
Rob's Bonus Best Practice Considerations |
|
|
41 | (2) |
Chapter 3 Waits and Queues |
|
43 | (38) |
|
Introducing Waits and Queues |
|
|
43 | (2) |
|
|
45 | (2) |
|
Blame Game: Blame SQL Server |
|
|
47 | (1) |
|
|
47 | (8) |
|
|
48 | (1) |
|
|
49 | (1) |
|
Observing Wait Statistics |
|
|
50 | (5) |
|
|
55 | (3) |
|
|
58 | (7) |
|
|
58 | (1) |
|
|
59 | (1) |
|
Anatomy of a CPU Metadata Query |
|
|
59 | (5) |
|
|
64 | (1) |
|
I/O May Be Why Your Server Is So Slow |
|
|
65 | (15) |
|
|
65 | (1) |
|
Fragmentation Affects I/O |
|
|
66 | (1) |
|
|
67 | (5) |
|
Related Performance Monitor Counters |
|
|
72 | (2) |
|
|
74 | (4) |
|
|
78 | (1) |
|
Blocking and Locking, Oh My! |
|
|
79 | (1) |
|
|
80 | (1) |
Chapter 4 Much Ado About Indexes |
|
81 | (34) |
|
|
82 | (14) |
|
|
82 | (1) |
|
Index Types and Terminology |
|
|
83 | (2) |
|
Index Advantages vs. Disadvantages |
|
|
85 | (1) |
|
|
86 | (2) |
|
Index-Related Dynamic Management Views and Functions |
|
|
88 | (2) |
|
|
90 | (1) |
|
Fill Factor and Page Splitting |
|
|
91 | (5) |
|
|
96 | (14) |
|
|
96 | (2) |
|
|
98 | (3) |
|
|
101 | (1) |
|
|
102 | (5) |
|
|
107 | (3) |
|
Database Engine Tuning Advisor |
|
|
110 | (4) |
|
|
114 | (1) |
Chapter 5 Tools of the Trade: Basic Training |
|
115 | (34) |
|
|
115 | (1) |
|
Monday Morning Mania (Busiest DBA Day) |
|
|
116 | (5) |
|
|
117 | (3) |
|
|
120 | (1) |
|
|
121 | (2) |
|
|
121 | (1) |
|
|
122 | (1) |
|
SQL Server 2012 Performance Dashboard |
|
|
123 | (3) |
|
The Power of Dynamic Management Views and Function Categories |
|
|
126 | (5) |
|
sys.dm_os_performance_counters (How to Read and Calculate Them) |
|
|
127 | (2) |
|
|
129 | (2) |
|
Bonus: sys.dm_exec_query_profiles DMO (SQL Server 2014 Only) |
|
|
131 | (1) |
|
|
131 | (3) |
|
|
132 | (1) |
|
Ensure Default Trace Is On |
|
|
132 | (2) |
|
|
134 | (1) |
|
|
135 | (10) |
|
Management Data Warehouse: SQL Server 2008 and Higher |
|
|
145 | (2) |
|
|
147 | (2) |
Chapter 6 Expanding Your Tool Set |
|
149 | (38) |
|
|
149 | (24) |
|
|
149 | (1) |
|
|
150 | (10) |
|
The system_health Session |
|
|
160 | (2) |
|
The sp_server_diagnostics Procedure |
|
|
162 | (1) |
|
|
163 | (4) |
|
SQL Server 2012 System Health Reporting Dashboard |
|
|
167 | (6) |
|
Other Free and Downloadable Tools |
|
|
173 | (12) |
|
|
173 | (1) |
|
|
174 | (1) |
|
Performance Analysis of Logs |
|
|
174 | (9) |
|
SQL Server Best Practice Analyzer (Through 2012) |
|
|
183 | (2) |
|
|
185 | (2) |
Chapter 7 Creating a SQL Health Repository |
|
187 | (44) |
|
Laying the Repository Groundwork |
|
|
187 | (1) |
|
Deploying the Management Data Warehouse |
|
|
188 | (6) |
|
Configuring the Data Collection |
|
|
194 | (3) |
|
|
197 | (11) |
|
Accounts, Privileges, Rights, and Credentials |
|
|
208 | (7) |
|
Configuring Account Privileges for MDW Server |
|
|
209 | (1) |
|
Configuring Account Privileges for the MDW Client |
|
|
210 | (5) |
|
|
215 | (1) |
|
Defining a Custom Data Collection |
|
|
215 | (8) |
|
|
223 | (6) |
|
|
229 | (2) |
Chapter 8 Monitoring and Reporting |
|
231 | (48) |
|
SQL Server Agent Alerts, Operators, and Notifications |
|
|
232 | (14) |
|
|
232 | (6) |
|
Configuring SQL Server Agent Alerts |
|
|
238 | (8) |
|
Monitoring with Extended Events |
|
|
246 | (12) |
|
|
248 | (7) |
|
|
255 | (2) |
|
Monitoring Errors with Extended Events |
|
|
257 | (1) |
|
|
258 | (3) |
|
|
259 | (1) |
|
Features, Polling, Agents, Push vs. Pull |
|
|
260 | (1) |
|
|
261 | (1) |
|
Evaluating Monitoring Software |
|
|
261 | (1) |
|
Reporting on Server Health |
|
|
261 | (16) |
|
|
262 | (2) |
|
Building the Custom SSRS Report |
|
|
264 | (1) |
|
Create the Report Framework |
|
|
265 | (12) |
|
|
277 | (2) |
Chapter 9 High Availability and Disaster Recovery |
|
279 | (44) |
|
Evolution of Disaster Recovery and SQL Server |
|
|
279 | (11) |
|
|
281 | (3) |
|
Concepts of High Availability and Disaster Recovery |
|
|
284 | (1) |
|
Database Backups and Recovery Models |
|
|
285 | (2) |
|
Challenges of High Availability |
|
|
287 | (2) |
|
|
289 | (1) |
|
|
290 | (7) |
|
|
291 | (1) |
|
|
291 | (4) |
|
Database Corruption: Detection, Recovery, and Repair |
|
|
295 | (2) |
|
|
297 | (5) |
|
|
297 | (1) |
|
|
298 | (4) |
|
|
302 | (6) |
|
|
302 | (1) |
|
Configuring Database Mirroring |
|
|
303 | (5) |
|
|
308 | (4) |
|
|
309 | (2) |
|
|
311 | (1) |
|
Availability Groups (2012) |
|
|
312 | (7) |
|
Enabling and Setting Up the AG Feature |
|
|
312 | (6) |
|
|
318 | (1) |
|
|
319 | (1) |
|
Peer-to- Peer Replication |
|
|
319 | (2) |
|
|
321 | (1) |
|
|
322 | (1) |
Chapter 10 Surviving the Audit |
|
323 | (46) |
|
|
323 | (1) |
|
|
324 | (1) |
|
Benefits of Database Forensics |
|
|
325 | (1) |
|
|
325 | (1) |
|
Industry Rules and Regulation |
|
|
326 | (1) |
|
Database Access Control and Compliance |
|
|
326 | (6) |
|
Control Access to the Database Environment |
|
|
326 | (1) |
|
|
327 | (1) |
|
|
327 | (1) |
|
|
327 | (1) |
|
|
328 | (1) |
|
|
328 | (1) |
|
Login and Password Policy Enforcement |
|
|
328 | (3) |
|
The Tale of the DBA and the Developer |
|
|
331 | (1) |
|
|
332 | (5) |
|
Reading the Transaction Log |
|
|
333 | (4) |
|
C2 Auditing and Common Criteria Compliance |
|
|
337 | (1) |
|
|
338 | (8) |
|
Creating an Audit in SQL Server Management Studio |
|
|
339 | (3) |
|
Server Audit Specification |
|
|
342 | (2) |
|
Database Audit Specification |
|
|
344 | (1) |
|
Generating Audit Activity |
|
|
344 | (1) |
|
|
345 | (1) |
|
|
346 | (2) |
|
|
348 | (8) |
|
Reviewing the Default Trace Output |
|
|
348 | (2) |
|
Using the Default Trace to Capture SQL Server Configuration Changes |
|
|
350 | (1) |
|
Creating the History Tracking Table |
|
|
351 | (1) |
|
|
352 | (1) |
|
Creating the Stored Procedure |
|
|
353 | (2) |
|
|
355 | (1) |
|
|
356 | (5) |
|
|
361 | (7) |
|
Creating a Implementing a SQL Password Enforcement Policy |
|
|
363 | (3) |
|
|
366 | (1) |
|
|
367 | (1) |
|
|
368 | (1) |
Index |
|
369 | |