Troubleshooting SQL Server - A Guide for the Accidental DBA [Simple Talk Publishing].pdf
(
2327 KB
)
Pobierz
High Performance SQL Server
Troubleshooting SQL Server
A Guide for the Accidental DBA
Jonathan Kehayias and Ted Krueger
Foreword by Paul Randal
Technical review by Gail Shaw
ISBN: 978-1-906434-77-9
Troubleshooting SQL Server
A Guide for the Accidental DBA
By Jonathan Kehayias and Ted Krueger
With a Foreword from Paul S. Randal
First published by Simple Talk Publishing September 2011
Copyright Jonathan Kehayias and Ted Krueger 2011
ISBN 978-1-906434-77-9
The right of Jonathan Kehayias and Ted Krueger to be identiied as the authors of this work has been
asserted by them in accordance with the Copyright, Designs and Patents Act 1988.
All rights reserved. No part of this publication may be reproduced, stored or introduced into a retrieval
system, or transmitted, in any form, or by any means (electronic, mechanical, photocopying, recording or
otherwise) without the prior written consent of the publisher. Any person who does any unauthorized act
in relation to this publication may be liable to criminal prosecution and civil claims for damages.
This book is sold subject to the condition that it shall not, by way of trade or otherwise, be lent, re-sold,
hired out, or otherwise circulated without the publisher's prior consent in any form other than which it is
published and without a similar condition including this condition being imposed on the subsequent
publisher.
Edited by Tony Davis
Technical Review and Additional Material: Gail Shaw
Cover Image by Andy Martin
Typeset & Designed by Matthew Tye & Gower Associates
Table of Contents
Introduction ................................................................................... 16
Who is this book for? ............................................................................................................. 17
Code Examples ....................................................................................................................... 18
Chapter 1: A Performance Troubleshooting Methodology .......... 19
Deining a Troubleshooting Methodology ........................................................................ 20
Wait Statistics: the Basis for Troubleshooting .................................................................. 23
Virtual File Statistics ..............................................................................................................28
Performance Counters ..........................................................................................................30
Plan Cache Usage ................................................................................................................... 38
Summary ................................................................................................................................. 40
Chapter 2: Disk I/O Coniguration ................................................ 42
Disk Coniguration: Basic Considerations ......................................................................... 43
Disk size vs. disk throughput ........................................................................................... 44
Random versus sequential I/O ..........................................................................................45
Choosing the Right RAID Level .......................................................................................... 46
A brief overview of RAID conigurations ....................................................................... 48
Disk size and throughput considerations .......................................................................54
Workload considerations ...................................................................................................57
Direct Attached Storage vs. Storage Area Networks ......................................................... 61
Direct Attached Storage .....................................................................................................61
Storage Area Networks ...................................................................................................... 62
Diagnosing Disk I/O Issues ..................................................................................................65
Common Disk I/O Problems ................................................................................................65
Sizing for capacity instead of I/O performance ............................................................ 66
Incorrect workload isolation ............................................................................................ 67
Incorrect partition alignment .......................................................................................... 68
Incorrect bandwidth using SAN conigurations ........................................................... 70
Summary .................................................................................................................................. 71
Chapter 3: High CPU Utilization .................................................. 73
Investigating CPU Pressure ..................................................................................................74
Performance Monitor ........................................................................................................ 74
SQL Trace ............................................................................................................................ 76
Dynamic Management Views ...........................................................................................77
Common Causes of High CPU Usage ................................................................................. 85
Missing indexes .................................................................................................................. 86
Outdated statistics ............................................................................................................. 88
Non-SARGable predicates ................................................................................................. 89
Implicit conversions ............................................................................................................93
Parameter sniing .............................................................................................................. 95
Ad hoc non-parameterized queries ................................................................................103
Inappropriate parallelism ................................................................................................ 108
TokenAndPermUserStore ................................................................................................ 117
Windows Server and BIOS power saving options .......................................................120
Summary ................................................................................................................................ 122
Additional Resources ........................................................................................................... 122
Chapter 4: Memory Management ............................................... 126
The Self-Tuning Database Engine ..................................................................................... 127
How SQL Server Allocates Memory .................................................................................. 127
32-bit Virtual Address Space limitations.........................................................................131
Using 64-bit SQL Server ................................................................................................. 140
Memory coniguration options with 64-bit SQL Server ............................................ 143
Diagnosing Memory Pressure ............................................................................................149
Memory-related counters ................................................................................................150
Memory-related DMVs ..................................................................................................... 154
Common Memory-Related Problems ................................................................................155
The SQL Server memory leak myth ............................................................................... 155
Paging problems ................................................................................................................ 155
OS instability due to Lock Pages in Memory
plus unlimited max server memory ............................................................................... 156
App Domain is marked for unload due to memory pressure .................................... 157
Plik z chomika:
xmagisterx
Inne pliki z tego folderu:
SQL Od Podstaw [Helion][Paul Wilton, John Colby].pdf
(128974 KB)
Microsoft SQL Server 2008 Reporting Services Unleashed [Sams].pdf
(22107 KB)
SQL Server MVP Deep Dives Volume 2 [Manning].pdf
(23394 KB)
MSTS Exam 70-432. Microsoft SQL Server 2008 — Implementation and Maintenance. Training Kit [Microsoft Press].pdf
(21392 KB)
Learning SQL Server 2008 Reporting Services [Packt Publishing].pdf
(20526 KB)
Inne foldery tego chomika:
Pliki dostępne do 01.06.2025
Pliki dostępne do 19.01.2025
BAZY DANYCH SQL SERVER (VIDEO)
FILMY (haslo=magister)
FOTOGRAFIA (CZASOPISMA)
Zgłoś jeśli
naruszono regulamin