Professional SQL Server 2008 Internals and Troubleshooting ppt

621 640 0
Professional SQL Server 2008 Internals and Troubleshooting ppt

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Christian Bolton, Justin Langford, Brent Ozar, James Rowland-Jones, Steven Wort Wrox Programmer to Programmer™ Join the discussion @ p2p.wrox.com Professional SQL Server ® 2008 Internals and Troubleshooting $59.99 USA $71.99 CAN When faced with a variety of SQL Server issues, you need to be able to troubleshoot SQL Server as well as its underlying operating system. To that end, this author group of SQL Server experts presents you with invaluable advice that brings together—and simplifies—practical internal information concerning SQL Server along with troubleshooting techniques and methodologies. Packed with real-world examples of ways to effectively use troubleshooting tools, this book shows you how to efficiently and accurately determine the root of your SQL Server problem so you can successfully resolve it. • Escorts you through the lifecycle of a query to establish an under- standing of the fundamental concepts and architectures • Examines the use of memory including the physical components, Windows memory management, and SQL Server’s own memory architecture • Reviews SQL Server wait types and how to monitor them with Extended Events • Equips you with the knowledge to confidently specify and monitor your storage performance requirements • Details SQL Server’s locking model, the internal use of latches, and row versioning • Shows you how to use SQLDiag, RML Utilities, SQL Nexus, the Management Data Warehouse, and how to build your own SQL Server Management Studio reports Christian Bolton is coauthor of Professional SQL Server 2005 Performance Tuning and Technical Director for Coeo Ltd. Justin Langford is coauthor of Professional SQL Server 2005 Performance Tuning and leads the Managed Support team for Coeo Ltd. Brent Ozar is a SQL Server expert for Quest Software. James Rowland-Jones is an advisory consultant for EMC Consulting. Steven Wort is a developer in the Windows Division at Microsoft. Wrox guides are crafted to make learning programming languages and technologies easier than you think. Written by programmers for programmers, they provide a structured, tutorial format that will guide you through all the techniques involved. Database Management / General An in-depth look at SQL Server and best practices for troubleshooting wrox.com Programmer Forums Join our Programmer to Programmer forums to ask and answer programming questions about this book, join discussions on the hottest topics in the industry, and connect with fellow programmers from around the world. Code Downloads Take advantage of free code samples from this book, as well as code samples from hundreds of other books, all ready to use. Read More Find articles, ebooks, sample chapters and tables of contents for hundreds of books, and more reference resources on programming topics that matter to you. Bolton, Langford, et al. Professional SQL Server ® 2008 Internals and Troubleshooting www.it-ebooks.info Get more out of wrox.com Programmer to Programmer ™ Interact Take an active role online by participating in our P2P forums @ p2p.wrox.com Wrox Online Library Hundreds of our books are available online through Books24x7.com Wrox Blox Download short informational pieces and code to keep you up to date and out of trouble! Join the Community Sign up for our free monthly newsletter at newsletter.wrox.com Browse Ready for more Wrox? We have books and e-books available on .NET, SQL Server, Java, XML, Visual Basic, C#/ C++, and much more! Contact Us. We always like to get feedback from our readers. Have a book idea? Need community support? Let us know by e-mailing wrox-partnerwithus@wrox.com www.it-ebooks.info PROFESSIONAL SQL SERVER ® 2008 INTERNALS AND TROUBLESHOOTING INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv CHAPTER 1 SQL Server Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 CHAPTER 2 Understanding Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 CHAPTER 3 SQL Server Waits and Extended Events . . . . . . . . . . . . . . . . . . . . . . . . . . 59 CHAPTER 4 Working with Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 CHAPTER 5 CPU and Query Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .137 CHAPTER 6 Locking and Latches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 CHAPTER 7 Knowing Tempdb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .269 CHAPTER 8 Defi ning Your Approach To Troubleshooting . . . . . . . . . . . . . . . . . . . . .305 CHAPTER 9 Viewing Server Performance with PerfMon and the PAL Tool . . . . . . 329 CHAPTER 10 Tracing SQL Server with SQL Trace and Profi ler . . . . . . . . . . . . . . . . . . 369 CHAPTER 11 Consolidating Data Collection with SQLDiag and the PerfStats Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437 CHAPTER 12 Introducing RML Utilities for Stress Testing and Trace File Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459 CHAPTER 13 Bringing It All Together with SQL Nexus . . . . . . . . . . . . . . . . . . . . . . . . . 481 CHAPTER 14 Using Management Studio Reports and the Performance Dashboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .505 CHAPTER 15 Using SQL Server Management Data Warehouse . . . . . . . . . . . . . . . . . 539 CHAPTER 16 Shortcuts to E cient Data Collection and Quick Analysis . . . . Wrox.com INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555 84289ffirs.indd i84289ffirs.indd i 11/23/09 1:35:42 PM11/23/09 1:35:42 PM www.it-ebooks.info 84289ffirs.indd ii84289ffirs.indd ii 11/23/09 1:35:42 PM11/23/09 1:35:42 PM www.it-ebooks.info PROFESSIONAL SQL Server ® 2008 Internals and Troubleshooting 84289ffirs.indd iii84289ffirs.indd iii 11/23/09 1:35:42 PM11/23/09 1:35:42 PM www.it-ebooks.info 84289ffirs.indd iv84289ffirs.indd iv 11/23/09 1:35:42 PM11/23/09 1:35:42 PM www.it-ebooks.info PROFESSIONAL SQL Server ® 2008 Internals and Troubleshooting Christian Bolton Justin Langford Brent Ozar James Rowland-Jones Jonathan Kehayias Cindy Gross Steven Wort 84289ffirs.indd v84289ffirs.indd v 11/23/09 1:35:42 PM11/23/09 1:35:42 PM www.it-ebooks.info Professional SQL Server® 2008 Internals and Troubleshooting Published by Wiley Publishing, Inc. 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright © 2010 by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 978-0-470-48428-9 Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions. Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifi cally disclaim all warranties, including without limitation warranties of fi tness for a particular purpose. No warranty may be created or extended by sales or pro- motional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the pub- lisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read. For general information on our other products and services please contact our Customer Care Department within the United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002. Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books. Library of Congress Control Number: 2009941346 Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Wrox Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affi liates, in the United States and other coun- tries, and may not be used without written permission. SQL Server is a registered trademark of Microsoft Corporation in the United States and/or other countries. All other trademarks are the property of their respective owners. Wiley Publishing, Inc. is not associated with any product or vendor mentioned in this book. 84289ffirs.indd vi84289ffirs.indd vi 11/23/09 1:35:42 PM11/23/09 1:35:42 PM www.it-ebooks.info For Gemma, with all my love and thanks —Christian Bolton This is dedicated to Erika, who has been dedicated to me despite my long working hours. I love you dearly, and I love working on next chapters. —Brent Ozar 84289ffirs.indd vii84289ffirs.indd vii 11/23/09 1:35:42 PM11/23/09 1:35:42 PM www.it-ebooks.info 84289ffirs.indd viii84289ffirs.indd viii 11/23/09 1:35:43 PM11/23/09 1:35:43 PM www.it-ebooks.info [...]... of SQL Server consulting and managed support services in the UK and Europe Prior to this Christian worked for 5 years at Microsoft, leading the SQL Server Premier Field Engineering team in the UK He is a Microsoft Certified Architect, Master and MVP for SQL Server, and co-author of Professional SQL Server 2005 Performance Tuning He works out of London and lives in the south of England with his wife and. .. at SQL PASS In 2008 she started the Boise SQL Server User Group, an affi liate of the SQLCommunity.org site (where she is a worldwide SQL Server Community Leader) to share SQL Server wisdom in the Idaho SQL Server community Most recently she obtained the Microsoft Certified Master: SQL Server Qualification, which was a hard-fought prize Over the years Cindy has learned from many wonderful friends and. .. 6: Locking and Latches This chapter takes a very in-depth look at how SQL Server manages isolation and concurrency and contains full details on how SQL Server implements locking and row versioning depending on how its configured The chapter also clarifies another type of lock that SQL Server uses internally called a latch, and explores the use and detailed implementation of latches within SQL Server —... thorough understanding of how SQL Server uses memory Once you understand the core architecture of SQL Server s memory management, you will be well prepared to diagnose memory-related problems as well Chapter 3: SQL Server Waits and Extended Events This chapter introduces the benefits of reviewing SQL Server Waits and the architecture that supports this feature It looks into how they occur and what they... tracing can be used, and what’s new in SQL Server 2008 Chapter 11: Consolidating Data Collection with SQLDiag and the PerfStats Script SQLDiag is a great tool that was introduced in SQL Server 2005 to help coordinate the collection of Performance Monitor logs and SQL Traces, as well as the gathering of other system data In this chapter you’ll learn how to configure, customize, and run SQLDiag, as well as... that the flow and impact were interrupted The decision was made to alter the approach to include architectural information, not just on SQL Server, but on the whole platform on which SQL Server depends If you’re troubleshooting an apparent SQL Server issue, you need to be able to troubleshoot the underlying operating system and storage as well as SQL Server, so we wanted to bring together and simplify... together to efficiently and accurately determine the root cause of issues on systems running SQL Server WHO THIS BOOK IS FOR This book is intended for those people who regard themselves as, or who aspire to be, SQL Server professionals in predominantly relational environments What I mean by a SQL Server professional, is anyone that regards SQL Server as one of their core product skills and continually strives... high-level overview of SQL Server s architecture, leading into chapters on the three core resources that are important to SQL Server: memory, storage, and CPU Nestled in between these chapters at strategic points are additional chapters which cover material that is critical to understand for effective troubleshooting: SQL Server Waits and Extended Events, Locking and Latches, and tempdb This section... gas industry After spending two and a half years working in T -SQL, in late 2006, he transitioned to the role of Database Administrator He has experience in upgrading and consolidating SQL environments, and has experience in running SQL Server in Virtual Environments on VMWare ESX 3.5+ He is a member of the Tampa SQL Server User Group and a regular speaker about SQL Server at events Jonathan authored... enthusiastic support for the project and for clarifying some of the fi ner details of exactly what the code in SQL Server is doing I’d also like to thank the following SQL Server professionals, MVPs, and Microsoft staff for their inspiration and support whether knowingly or not: Mark Anderson, Sunil Agarwal, Chirag Roy, Aaron Bertrand, Denny Cherry, Grant Fritchey, and Paul Randal Finally, I’d like to thank . Architect, Master and MVP for SQL Server, and co-author of Professional SQL Server 2005 Performance Tuning. He works out of London and lives in the south of England with his wife and children chapters and tables of contents for hundreds of books, and more reference resources on programming topics that matter to you. Bolton, Langford, et al. Professional SQL Server ® 2008 Internals and. PM11/23/09 1:35:42 PM www.it-ebooks.info PROFESSIONAL SQL Server ® 2008 Internals and Troubleshooting Christian Bolton Justin Langford Brent Ozar James Rowland-Jones Jonathan Kehayias Cindy Gross Steven

Ngày đăng: 29/03/2014, 22:20

Từ khóa liên quan

Mục lục

  • Professional SQL Server 2008 Internals and Troubleshooting

    • About the Authors

    • Acknowledgments

    • Contents

    • Introduction

      • WHO THIS BOOK IS FOR

      • WHAT THIS BOOK COVERS

      • HOW THIS BOOK IS STRUCTURED

      • CONVENTIONS

      • SOURCE CODE

      • ERRATA

      • P2P.WROX.COM

      • Chapter 1: SQL Server Architecture

        • DATABASE TRANSACTIONS

        • THE LIFE CYCLE OF A QUERY

        • THE SQLOS (SQL OPERATING SYSTEM)

        • SUMMARY

        • Chapter 2: Understanding Memory

          • WINDOWS AND MEMORY

          • SQL SERVER MEMORY

          • SUMMARY

          • Chapter 3: SQL Server Waits and Extended Events

            • WAITS

            • EXTENDED EVENTS

            • EXAMINING WAITS WITH EXTENDED EVENTS

Tài liệu cùng người dùng

Tài liệu liên quan