Introduction |
|
xxix | |
|
|
|
Chapter 1 SQL Server Architecture |
|
|
3 | (26) |
|
|
3 | (1) |
|
|
4 | (1) |
|
|
4 | (1) |
|
|
5 | (1) |
|
The Life Cycle of a Query |
|
|
5 | (1) |
|
The Relational and Storage Engines |
|
|
6 | (1) |
|
|
6 | (1) |
|
|
7 | (8) |
|
|
15 | (3) |
|
|
18 | (4) |
|
SQL Server's Execution Model and the SQLOS |
|
|
22 | (1) |
|
|
22 | (3) |
|
|
25 | (4) |
|
|
26 | (3) |
|
Chapter 2 Demystifying Hardware |
|
|
29 | (24) |
|
The Importance of Hardware |
|
|
29 | (1) |
|
How Workload Affects Hardware and Storage Considerations |
|
|
30 | (1) |
|
|
30 | (2) |
|
|
32 | (1) |
|
|
33 | (2) |
|
Processor Vendor Selection |
|
|
35 | (1) |
|
|
35 | (8) |
|
AMD Processors and Numbering |
|
|
43 | (3) |
|
Choosing and Configuring Hardware for Redundancy |
|
|
46 | (2) |
|
Hardware Comparison Tools |
|
|
48 | (1) |
|
|
48 | (2) |
|
|
50 | (3) |
|
|
51 | (2) |
|
Chapter 3 Understanding Memory |
|
|
53 | (24) |
|
|
53 | (1) |
|
Physical and Virtual Memory |
|
|
54 | (1) |
|
|
54 | (1) |
|
Maximum Supported Physical Memory |
|
|
55 | (1) |
|
|
56 | (3) |
|
|
59 | (4) |
|
|
63 | (1) |
|
|
64 | (1) |
|
Clerks, Caches, and the Buffer Pool |
|
|
64 | (6) |
|
Optimizing SQL Server Memory Configuration |
|
|
70 | (1) |
|
Min and Max Server Memory |
|
|
70 | (2) |
|
|
72 | (2) |
|
Optimize for Ad-Hoc Workloads |
|
|
74 | (3) |
|
|
76 | (1) |
|
Chapter 4 Storage Systems |
|
|
77 | (34) |
|
|
77 | (1) |
|
|
78 | (1) |
|
|
78 | (4) |
|
SQL Server and the Windows I/O Subsystem |
|
|
82 | (2) |
|
Choosing the Right Storage Networks |
|
|
84 | (2) |
|
|
86 | (1) |
|
|
86 | (2) |
|
|
88 | (1) |
|
|
89 | (3) |
|
|
92 | (1) |
|
Windows Failover Clustering |
|
|
93 | (1) |
|
SQL Server AlwaysOn Availability Groups |
|
|
94 | (1) |
|
|
94 | (1) |
|
|
95 | (1) |
|
Storage Performance Counters |
|
|
96 | (1) |
|
|
97 | (3) |
|
|
100 | (1) |
|
|
101 | (1) |
|
|
101 | (2) |
|
|
103 | (1) |
|
NTFS Allocation Unit Size |
|
|
104 | (1) |
|
|
104 | (2) |
|
Storage Performance Testing |
|
|
106 | (5) |
|
|
110 | (1) |
|
Chapter 5 Query Processing and Execution |
|
|
111 | (38) |
|
|
111 | (1) |
|
|
112 | (1) |
|
|
112 | (1) |
|
|
112 | (1) |
|
|
113 | (1) |
|
|
114 | (1) |
|
|
115 | (1) |
|
sql_handle or plan_handle |
|
|
115 | (1) |
|
|
116 | (1) |
|
Plan Caching and Recompilation |
|
|
117 | (6) |
|
|
123 | (6) |
|
|
129 | (3) |
|
|
132 | (3) |
|
|
135 | (5) |
|
|
140 | (1) |
|
|
140 | (9) |
|
|
147 | (2) |
|
Chapter 6 Locking and Concurrency |
|
|
149 | (32) |
|
|
149 | (1) |
|
|
150 | (1) |
|
|
150 | (1) |
|
|
151 | (1) |
|
|
151 | (1) |
|
|
151 | (1) |
|
|
151 | (1) |
|
|
151 | (1) |
|
|
152 | (1) |
|
|
152 | (1) |
|
|
152 | (1) |
|
The Dangers of Concurrency |
|
|
153 | (1) |
|
|
153 | (2) |
|
|
155 | (1) |
|
|
156 | (2) |
|
|
158 | (3) |
|
|
161 | (1) |
|
|
162 | (1) |
|
|
163 | (1) |
|
|
163 | (2) |
|
|
165 | (2) |
|
|
167 | (6) |
|
|
173 | (1) |
|
|
174 | (1) |
|
|
175 | (1) |
|
|
175 | (1) |
|
|
176 | (1) |
|
|
177 | (1) |
|
|
177 | (1) |
|
|
178 | (1) |
|
|
178 | (1) |
|
|
178 | (3) |
|
|
179 | (2) |
|
Chapter 7 Latches and Spinlocks |
|
|
181 | (30) |
|
|
181 | (1) |
|
|
182 | (1) |
|
|
182 | (1) |
|
Measuring Latch Contention |
|
|
183 | (1) |
|
Measuring Spinlock Contention |
|
|
184 | (1) |
|
|
185 | (1) |
|
|
185 | (1) |
|
Understanding Latches and Spinlocks |
|
|
186 | (1) |
|
|
186 | (1) |
|
|
187 | (7) |
|
|
194 | (1) |
|
|
194 | (1) |
|
|
195 | (1) |
|
|
195 | (1) |
|
|
195 | (1) |
|
|
195 | (1) |
|
|
195 | (1) |
|
|
195 | (1) |
|
|
196 | (1) |
|
|
196 | (1) |
|
|
197 | (1) |
|
|
198 | (1) |
|
Monitoring Latches and Spinlocks |
|
|
199 | (1) |
|
|
199 | (2) |
|
|
201 | (1) |
|
|
202 | (1) |
|
Latch Contention Examples |
|
|
203 | (1) |
|
Inserts When the Clustered Index Key Is an Identity Field |
|
|
203 | (2) |
|
|
205 | (3) |
|
|
208 | (1) |
|
Spinlock Contention in Name Resolution |
|
|
209 | (2) |
|
|
209 | (2) |
|
|
211 | (30) |
|
|
211 | (1) |
|
|
212 | (1) |
|
|
213 | (4) |
|
Internal Temporary Objects |
|
|
217 | (1) |
|
|
217 | (3) |
|
Troubleshooting Common Issues |
|
|
220 | (1) |
|
|
220 | (9) |
|
Monitoring Tempdb I/O Performance |
|
|
229 | (2) |
|
Troubleshooting Space Issues |
|
|
231 | (1) |
|
Configuration Best Practices |
|
|
232 | (1) |
|
|
232 | (2) |
|
Tempdb Initial Sizing and Autogrowth |
|
|
234 | (3) |
|
Configuring Multiple Tempdb Data Files |
|
|
237 | (4) |
|
|
237 | (4) |
|
Part II Troubleshooting Tools and Lessons From The Field |
|
|
|
Chapter 9 Troubleshooting Methodology and Practices |
|
|
241 | (18) |
|
|
241 | (1) |
|
|
242 | (1) |
|
Ten Steps to Successful Troubleshooting |
|
|
242 | (2) |
|
|
244 | (1) |
|
|
245 | (1) |
|
Working with Stakeholders |
|
|
245 | (1) |
|
|
246 | (1) |
|
|
247 | (1) |
|
|
248 | (1) |
|
Guidelines for Identifying the Problem |
|
|
248 | (1) |
|
|
249 | (1) |
|
|
250 | (2) |
|
|
252 | (1) |
|
|
253 | (1) |
|
Understanding Data Gathering |
|
|
253 | (1) |
|
|
254 | (1) |
|
|
255 | (1) |
|
Validating and Implementing Resolution |
|
|
256 | (1) |
|
|
256 | (1) |
|
Testing Changes in Isolation |
|
|
256 | (1) |
|
|
257 | (2) |
|
|
257 | (2) |
|
Chapter 10 Viewing Server Performance with Perfmon and The Pal Tool |
|
|
259 | (36) |
|
|
259 | (1) |
|
Performance Monitor Overview |
|
|
260 | (1) |
|
Reliability and Performance Monitor |
|
|
260 | (3) |
|
New PerfMon Counters for SQL Server 2012 |
|
|
263 | (5) |
|
Getting Started with PerfMon |
|
|
268 | (10) |
|
Getting More from Performance Monitor |
|
|
278 | (1) |
|
Bottlenecks and SQL Server |
|
|
278 | (1) |
|
|
279 | (5) |
|
|
284 | (1) |
|
Getting a Performance Baseline |
|
|
285 | (1) |
|
Performance Analysis of Logs |
|
|
285 | (1) |
|
|
285 | (4) |
|
Other PerfMon Log Analysis Tools |
|
|
289 | (1) |
|
Using SQL Server to Analyze PerfMon Logs |
|
|
289 | (1) |
|
Combining PerfMon Logs and SQL Profiler Traces |
|
|
289 | (1) |
|
|
290 | (1) |
|
|
291 | (2) |
|
|
293 | (2) |
|
|
293 | (2) |
|
Chapter 11 Consolidating Data Capture with Sqldiag |
|
|
295 | (30) |
|
The Data Collection Dilemma |
|
|
295 | (1) |
|
An Approach to Data Collection |
|
|
296 | (1) |
|
Getting Friendly with SQLdiag |
|
|
297 | (1) |
|
Using SQLdiag in Snapshot Mode |
|
|
298 | (1) |
|
Using SQLdiag as a Command-line Application |
|
|
299 | (4) |
|
Using SQLdiag as a Service |
|
|
303 | (2) |
|
Using SQLdiag Configuration Manager |
|
|
305 | (2) |
|
Configuring SQLdiag Data Collection Using Diag Manager |
|
|
307 | (3) |
|
Adding Trace Filters to a SQLdiag Configuration |
|
|
310 | (8) |
|
|
318 | (1) |
|
Gearing Up for Long-Term Data Collodion |
|
|
319 | (1) |
|
|
320 | (2) |
|
Alert-Driven Data Collection with SQLdiag |
|
|
322 | (3) |
|
|
323 | (2) |
|
Chapter 12 Bringing It All Together with SQL Nexus |
|
|
325 | (24) |
|
|
325 | (1) |
|
Getting Familiar with SQL Nexus |
|
|
326 | (1) |
|
|
326 | (2) |
|
Loading Data into a Nexus Database |
|
|
328 | (3) |
|
Analyzing the Aggregated Data |
|
|
331 | (9) |
|
|
340 | (1) |
|
|
341 | (1) |
|
Building Custom Reports for SQL Nexus |
|
|
342 | (1) |
|
Running SQL Nexus Using the Command Prompt |
|
|
342 | (1) |
|
Creating Your Own Tables in the SQL Nexus Database |
|
|
342 | (2) |
|
|
344 | (1) |
|
|
344 | (2) |
|
|
346 | (3) |
|
|
346 | (1) |
|
|
346 | (1) |
|
|
346 | (1) |
|
|
347 | (1) |
|
|
348 | (1) |
|
Chapter 13 Diagnosing Sql Server 2012 Using Extended Events |
|
|
349 | (30) |
|
Introduction to Extended Events |
|
|
349 | (1) |
|
Getting Familiar with Extended Events |
|
|
350 | (1) |
|
Why You Should Be Using Extended Events |
|
|
351 | (1) |
|
|
351 | (1) |
|
|
351 | (1) |
|
|
351 | (1) |
|
When You Might Use Extended Events |
|
|
352 | (1) |
|
What Are Extended Events? |
|
|
352 | (1) |
|
Where the Name Extended Events Comes From |
|
|
353 | (1) |
|
Extended Events Terminology |
|
|
354 | (9) |
|
Creating Extended Events Sessions in SQL Server 2012 |
|
|
363 | (1) |
|
Introduction to the New Session Form |
|
|
363 | (3) |
|
|
366 | (1) |
|
Monitoring for Page Splits with Extended Events |
|
|
367 | (2) |
|
Counting the Number of Locks Acquired per Object |
|
|
369 | (1) |
|
Creating Sessions Using T-SQL |
|
|
370 | (1) |
|
Viewing Data Captured by Extended Events |
|
|
371 | (1) |
|
|
371 | (8) |
|
|
376 | (3) |
|
Chapter 14 Enhancing Your Troubleshooting Toolset with Powershell |
|
|
379 | (26) |
|
|
379 | (1) |
|
Getting Started with PowerShell |
|
|
380 | (1) |
|
The PowerShell Environment |
|
|
381 | (2) |
|
The Basics --- Cmdlets, Variables, Advanced Functions, and Modules |
|
|
383 | (7) |
|
|
390 | (1) |
|
What's New in SQL Server 2012 |
|
|
391 | (2) |
|
Using PowerShell to Investigate Server Issues |
|
|
393 | (1) |
|
Interrogating Disk Space Utilization |
|
|
393 | (1) |
|
Interrogating Current Server Activity |
|
|
394 | (2) |
|
Interrogating for Warnings and Errors |
|
|
396 | (1) |
|
Interrogating Server Performance |
|
|
396 | (1) |
|
Proactively Tuning SQL Server Performance with PowerShell |
|
|
397 | (1) |
|
|
397 | (1) |
|
Managing Disk Space Utilization of Backups |
|
|
398 | (1) |
|
|
398 | (5) |
|
Scheduling Script Execution |
|
|
403 | (2) |
|
|
404 | (1) |
|
Chapter 15 Delivering A SQL Server Health Check |
|
|
405 | (40) |
|
The Importance of a SQL Server Health Check |
|
|
405 | (1) |
|
Running DMV and DMF Queries |
|
|
406 | (2) |
|
|
408 | (18) |
|
|
426 | (19) |
|
|
442 | (3) |
|
Chapter 16 Delivering Manageability and Performance |
|
|
445 | (24) |
|
Improve Efficiency with SQL Server Manageability Features |
|
|
445 | (1) |
|
Manageability Enhancements in SQL Server 2012 |
|
|
446 | (1) |
|
|
447 | (1) |
|
|
447 | (13) |
|
Other Microsoft Tools for Managing SQL Server |
|
|
460 | (1) |
|
|
461 | (3) |
|
System Center Operations Manager |
|
|
464 | (5) |
|
|
466 | (3) |
|
Chapter 17 Running SQL Server in A Virtual Environment |
|
|
469 | (40) |
|
The Shift to Server Virtualization |
|
|
469 | (1) |
|
An Overview of Virtualization |
|
|
470 | (1) |
|
History of Virtualization |
|
|
471 | (1) |
|
The Breadth of Virtualization |
|
|
472 | (1) |
|
|
472 | (1) |
|
|
473 | (1) |
|
|
473 | (1) |
|
|
474 | (1) |
|
|
474 | (1) |
|
|
475 | (1) |
|
SQL Server 2012 and Virtualization |
|
|
476 | (1) |
|
Limitations of Virtualization |
|
|
477 | (1) |
|
Common Virtualization Products |
|
|
477 | (1) |
|
|
477 | (1) |
|
|
478 | (1) |
|
|
479 | (1) |
|
Hardware Support for Virtualization |
|
|
479 | (1) |
|
|
480 | (1) |
|
|
480 | (1) |
|
|
480 | (2) |
|
Virtual Server (or Guest Server or Virtual Machine) |
|
|
482 | (1) |
|
Extended Features of Virtualization |
|
|
483 | (1) |
|
|
483 | (1) |
|
High-Availability Features |
|
|
483 | (1) |
|
|
484 | (2) |
|
Highly Available Virtual Servers |
|
|
486 | (1) |
|
Host and Guest Clustering |
|
|
487 | (1) |
|
Deploying SQL Server with Visualization's High-Availability Features |
|
|
487 | (1) |
|
|
488 | (1) |
|
|
488 | (1) |
|
|
488 | (1) |
|
Demand-Based Memory Allocation |
|
|
489 | (1) |
|
|
490 | (1) |
|
Identifying Candidates for Virtualization |
|
|
491 | (1) |
|
|
491 | (1) |
|
|
491 | (1) |
|
|
492 | (1) |
|
|
493 | (1) |
|
Non-Performance Related Requirements |
|
|
493 | (1) |
|
Architecting Successful Virtual Database Servers |
|
|
494 | (1) |
|
Architecting Virtual Database Servers vs. Physical Database Servers |
|
|
494 | (1) |
|
Virtual Database Server Design |
|
|
495 | (7) |
|
Monitoring Virtualized Database Servers |
|
|
502 | (1) |
|
Information and Misinformation from Performance Monitor |
|
|
503 | (6) |
|
|
507 | (2) |
Index |
|
509 | |