没有合适的资源?快使用搜索试试~ 我知道了~
首页Mastering SQL Server Profiler---一本专业sql教程
资源详情
资源评论
资源推荐

Mastering SQL
Server Profiler
Brad M McGehee
High Performance SQL Server

i
Mastering SQL Server
Profiler
By Brad McGehee
First published by Simple Talk Publishing 2009

ii
Copyright Brad McGehee 2009
ISBN 978-1-906434-11-3
The right of Brad McGehee to be identified as the author of this work has been asserted by him 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 unauthorised 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.
Typeset by Chris Massey

iii
CONTENTS
Contents ................................................................................................................................................3
About the author..................................................................................................................................7
Introduction..........................................................................................................................................9
Which Version of SQL Server Profiler is covered in this Book?.......................................9
How the Book is Structured ....................................................................................................9
Getting Started with Profiler............................................................................................................13
Why Mastering Profiler can help make you an exceptional DBA....................................13
The inner workings of Profiler .............................................................................................14
Profiler terminology................................................................................................................15
Getting Started with Profiler .................................................................................................17
Summary...................................................................................................................................28
Working with Traces and Templates ...............................................................................................29
Understanding the Events Selection Options.....................................................................29
Creating a Custom Trace from Scratch................................................................................32
Saving Traces to a SQL Server Table ...................................................................................43
Capturing Analysis Server Traces..........................................................................................46
Creating and Using Trace Templates....................................................................................48
Summary...................................................................................................................................60
Profiler GUI Tips and Tricks...........................................................................................................61
Tips on Selecting Profiler Events and Data Columns
.......................................................61
Tips on Using Column Filters ...............................................................................................69
Tips on Organizing Columns for Grouping and Analysis ................................................72
How the "Server Processes Trace Data" Option Affects Traces .....................................77
How to Set Global Trace Options........................................................................................78
How to Schedule a Trace's Stop Time .................................................................................79
How to Use the Auto Scroll Window ..................................................................................80
How to Search for Data in a Trace File ...............................................................................81
How to Set Bookmarks ..........................................................................................................82

iv
Summary...................................................................................................................................82
How to Identify Slow Running Queries .........................................................................................85
Creating a Trace to Identify Slow Running Queries...........................................................85
Analyzing the Poorly Performing Queries Identified by Profiler.....................................94
Summary.................................................................................................................................105
How to Identify and Troubleshoot SQL Server Problems .......................................................107
How to Identify Deadlocks..................................................................................................107
How to Identify Blocking Issues.........................................................................................115
How to Identify Excessive Auto Stats Activity.................................................................121
How to Identify Excessive Statement Compilations........................................................125
How to Identify Excessive Database File Growth/Shrinkage .......................................130
How to Identify Excessive Table/Index Scans.................................................................134
How to Identify Memory Problems ...................................................................................139
Summary.................................................................................................................................144
Using Profiler to Audit Database Activity ...................................................................................145
Capturing Audit Events........................................................................................................145
Selecting Data Columns .......................................................................................................148
Selecting Column Filters ......................................................................................................149
Organizing Columns.............................................................................................................150
How to Conduct an Audit Trace.........................................................................................151
Summary.................................................................................................................................153
Using Profiler with the Database Engine Tuning Advisor
........................................................155
Features and Benefits of Using the DTA..........................................................................155
How to Create a Trace for Use by the DTA .....................................................................156
Summary.................................................................................................................................170
Correlating Profiler with Performance Monitor .........................................................................171
How to Collect Profiler Data for Correlation Analysis ...................................................171
How to Collect Performance Monitor Data for Correlation Analysis..........................172
How to Capture Profiler Traces and Perfor
mance Monitor Logs .................................183
How to Correlate SQL Server 2005 Profiler Data with Performance Monitor Data.184
剩余305页未读,继续阅读












安全验证
文档复制为VIP权益,开通VIP直接复制

评论1