About the Authors |
|
ix | |
Preface |
|
xii | |
Acknowledgments |
|
xiv | |
|
Waiting and Blocking Issues |
|
|
1 | (46) |
|
|
1 | (2) |
|
|
3 | (1) |
|
|
3 | (6) |
|
Identifying Blocking Using sys.dm_os_waiting_tasks |
|
|
3 | (3) |
|
Statistically Identifying Blocking |
|
|
6 | (3) |
|
Identifying the Cause of Blocking |
|
|
9 | (4) |
|
Current Statements and Plans |
|
|
10 | (1) |
|
|
10 | (1) |
|
|
11 | (2) |
|
|
13 | (27) |
|
|
13 | (9) |
|
|
22 | (14) |
|
|
36 | (1) |
|
Timer and Queue Wait Types |
|
|
36 | (2) |
|
|
38 | (1) |
|
|
39 | (1) |
|
|
40 | (1) |
|
|
41 | (3) |
|
|
41 | (1) |
|
|
42 | (2) |
|
|
44 | (1) |
|
|
45 | (2) |
|
Data Corruption and Recovery Issues |
|
|
47 | (90) |
|
|
49 | (1) |
|
SQL Server 2005 Storage Internals |
|
|
49 | (19) |
|
|
49 | (2) |
|
|
51 | (1) |
|
Catalog Views and Base System Tables |
|
|
52 | (10) |
|
|
62 | (4) |
|
|
66 | (1) |
|
|
66 | (1) |
|
|
67 | (1) |
|
Read-Only Compressed Databases |
|
|
67 | (1) |
|
SQL Server 2005 Enhancements |
|
|
68 | (4) |
|
|
68 | (1) |
|
|
69 | (1) |
|
DBCC Checkdb Enhancements |
|
|
70 | (2) |
|
Data Recovery Best Practices |
|
|
72 | (4) |
|
Backup/Restore Best Practices |
|
|
72 | (2) |
|
Database and Transaction Log Best Practices |
|
|
74 | (1) |
|
DBCC Checkdb Best Practices |
|
|
75 | (1) |
|
Data Recovery Troubleshooting Scenarios |
|
|
76 | (11) |
|
|
76 | (8) |
|
Recovering the Resource Database |
|
|
84 | (2) |
|
|
86 | (1) |
|
Reinstalling the Operating System |
|
|
86 | (1) |
|
User Database Inaccessible |
|
|
87 | (13) |
|
Database Marked Recovery_Pending |
|
|
87 | (9) |
|
Handling Deferred Transactions |
|
|
96 | (1) |
|
|
97 | (2) |
|
|
99 | (1) |
|
|
100 | (7) |
|
|
100 | (5) |
|
|
105 | (2) |
|
Database Consistency Errors |
|
|
107 | (30) |
|
Handling Database Consistency Runtime Errors |
|
|
107 | (5) |
|
Handling DBCC Checkdb Errors |
|
|
112 | (12) |
|
|
124 | (1) |
|
What Does Each Error Mean? |
|
|
125 | (1) |
|
|
125 | (1) |
|
|
125 | (1) |
|
What Does Repair_Allow_Data_Loss Really Mean? |
|
|
126 | (1) |
|
Root Cause Analysis Before Recovering |
|
|
127 | (1) |
|
What if Repair Doesn't Work? |
|
|
127 | (1) |
|
Copying Data Versus Repair |
|
|
128 | (1) |
|
Find the Root Cause of Corruption: The Checklist |
|
|
128 | (9) |
|
|
137 | (46) |
|
Introduction to Windows Memory Management |
|
|
137 | (10) |
|
Internal Virtual Memory---Virtual Address Space |
|
|
138 | (3) |
|
|
141 | (1) |
|
|
141 | (2) |
|
|
143 | (1) |
|
|
144 | (2) |
|
|
146 | (1) |
|
SQLOS and SQL Server Memory Management |
|
|
147 | (36) |
|
|
148 | (1) |
|
|
149 | (1) |
|
|
149 | (1) |
|
|
150 | (3) |
|
|
153 | (6) |
|
|
159 | (24) |
|
|
183 | (42) |
|
Procedure Cache Architecture |
|
|
184 | (18) |
|
|
184 | (5) |
|
Structure of the Procedure Cache |
|
|
189 | (1) |
|
Procedure Cache and Memory |
|
|
190 | (3) |
|
Non-Cached Plans and Zero Cost Plans |
|
|
193 | (1) |
|
|
193 | (1) |
|
|
194 | (1) |
|
|
195 | (4) |
|
|
199 | (2) |
|
|
201 | (1) |
|
Flushing the Procedure Cache |
|
|
202 | (1) |
|
Common Cache-Related Problems and Solutions |
|
|
202 | (22) |
|
Using the Procedure Cache to Identify Expensive Queries |
|
|
202 | (3) |
|
|
205 | (11) |
|
High Compile Time Due to Poor Plan Reuse |
|
|
216 | (5) |
|
High CPU Due to Excessive Cache Lookup Time |
|
|
221 | (1) |
|
Memory Pressure Caused by Procedure Cache |
|
|
222 | (2) |
|
|
224 | (1) |
|
|
225 | (48) |
|
|
225 | (12) |
|
Compilation-Execution Sequence |
|
|
226 | (1) |
|
|
227 | (4) |
|
Query Compilation and Plan Selection |
|
|
231 | (2) |
|
Special Optimizations and Scenarios |
|
|
233 | (4) |
|
|
237 | (10) |
|
Compilation Time and Parameterization |
|
|
238 | (4) |
|
|
242 | (3) |
|
Cardinality and Cost Estimation |
|
|
245 | (2) |
|
|
247 | (21) |
|
|
247 | (7) |
|
|
254 | (14) |
|
|
268 | (2) |
|
Use Set-Oriented Programming |
|
|
268 | (1) |
|
Provide Constraints and Statistics Information |
|
|
268 | (1) |
|
|
269 | (1) |
|
Avoid Dynamic Language Features When Possible |
|
|
269 | (1) |
|
|
270 | (3) |
|
Server Crashes and Other Critical Failures |
|
|
273 | (58) |
|
|
274 | (11) |
|
SQL Server 2005 Server Recovery Internals |
|
|
274 | (6) |
|
SQL Server 2005 Enhancements |
|
|
280 | (5) |
|
Critical Errors and Server Recovery Troubleshooting |
|
|
285 | (46) |
|
Troubleshooting Server Startup Failures |
|
|
285 | (6) |
|
Troubleshooting Server-Critical Errors |
|
|
291 | (35) |
|
Troubleshooting a Server Hang |
|
|
326 | (5) |
|
|
331 | (38) |
|
|
332 | (2) |
|
|
332 | (1) |
|
Service Broker Objects and Terms |
|
|
333 | (1) |
|
|
333 | (1) |
|
Primary Diagnostic Tools and Methods |
|
|
334 | (5) |
|
The Transmission Queue View |
|
|
334 | (1) |
|
The SQL Profiler---Service Broker Trace Events |
|
|
335 | (4) |
|
Error Log and NT Event Log |
|
|
339 | (1) |
|
Broker Troubleshooting Walkthrough |
|
|
339 | (9) |
|
Walkthrough of a Simple/Secure Broker Application |
|
|
339 | (9) |
|
Other Service Broker Diagnostic Tools |
|
|
348 | (20) |
|
|
348 | (16) |
|
|
364 | (3) |
|
|
367 | (1) |
|
|
368 | (1) |
|
SQLOS and Scheduling Issues |
|
|
369 | (42) |
|
|
370 | (5) |
|
|
371 | (3) |
|
|
374 | (1) |
|
|
374 | (1) |
|
|
375 | (1) |
|
Configuration and Troubleshooting |
|
|
375 | (34) |
|
|
375 | (1) |
|
Network Connection Affinity |
|
|
376 | (3) |
|
|
379 | (3) |
|
|
382 | (1) |
|
Load-Balancing Tasks Between Schedulers |
|
|
383 | (1) |
|
Max Worker Threads Configuration |
|
|
383 | (2) |
|
Lightweight Pooling Configuration |
|
|
385 | (1) |
|
Affinity Mask Configuration |
|
|
386 | (2) |
|
Disk I/O Completion Processing |
|
|
388 | (1) |
|
Preemptive I/O Completion Processing |
|
|
389 | (1) |
|
|
390 | (14) |
|
|
404 | (2) |
|
Dedicated Admin Connection |
|
|
406 | (3) |
|
|
409 | (2) |
|
|
411 | (14) |
|
What Has Improved in SQL Server 2005? |
|
|
413 | (3) |
|
How Is Tempdb Space Consumed? |
|
|
416 | (3) |
|
|
416 | (1) |
|
What Is an Internal Object? |
|
|
417 | (1) |
|
What Is a Version Store Object? |
|
|
418 | (1) |
|
Practical Troubleshooting |
|
|
419 | (4) |
|
What to Do If You Run Out of Space in Tempdb |
|
|
419 | (2) |
|
What Is Tempdb Page Latch Contention? |
|
|
421 | (2) |
|
|
423 | (2) |
|
|
425 | (16) |
|
|
426 | (3) |
|
|
429 | (1) |
|
Get Performance to an Acceptable Level |
|
|
430 | (9) |
|
|
432 | (4) |
|
Why Did My Clustered SQL Server Instance Fail Over? |
|
|
436 | (1) |
|
Why Does It Take So Long to Fail Over? |
|
|
437 | (1) |
|
After Failover No One Can Connect |
|
|
438 | (1) |
|
|
438 | (1) |
|
|
439 | (1) |
|
|
439 | (1) |
|
|
439 | (2) |
The Aging Champion |
|
441 | (4) |
Index |
|
445 | |