This presentation is an introduction to the SQL Server Profiler tool.



Similar documents
Resource Governor, Monitoring and Tracing. On SQL Server

W I S E. SQL Server 2012 Database Engine Technical Update WISE LTD.

SOLIDWORKS Enterprise PDM - Troubleshooting Tools

Improve query performance with the new SQL Server 2016 Query Store!!

Introduction. Part I: Finding Bottlenecks when Something s Wrong. Chapter 1: Performance Tuning 3

SQL Server 2008 Administration

"Charting the Course... MOC AC SQL Server 2014 Performance Tuning and Optimization. Course Summary

Microsoft SQL Server 2008 Step by Step

High Performance SQL Server Mastering SQL Server Profiler

Reviewing Microsoft SQL Server 2005 Management Tools

Predicting Change Outcomes Leveraging SQL Server Profiler

SQL Server 2005: SQL Query Tuning

Microsoft SQL Server: MS Performance Tuning and Optimization Digital

SQL Server Performance Tuning and Optimization

Database Administrator Certificate Capstone Project Evaluation Checklist

Course 55144: SQL Server 2014 Performance Tuning and Optimization

Monitoring MySQL database with Verax NMS

RSA Security Analytics

Hands-On Microsoft Windows Server 2008

Business Application Services Testing

Course 55144B: SQL Server 2014 Performance Tuning and Optimization

MOC 20462C: Administering Microsoft SQL Server Databases

The Complete Performance Solution for Microsoft SQL Server

28 What s New in IGSS V9. Speaker Notes INSIGHT AND OVERVIEW

FIGURE Selecting properties for the event log.

Server Manager Performance Monitor. Server Manager Diagnostics Page. . Information. . Audit Success. . Audit Failure

6231B: Maintaining a Microsoft SQL Server 2008 R2 Database

Configuring WMI Performance Monitors

Database Maintenance Essentials

DB Audit Expert 3.1. Performance Auditing Add-on Version 1.1 for Microsoft SQL Server 2000 & 2005

SQL Server Solutions GETTING STARTED WITH. SQL Diagnostic Manager

One of the database administrators

SQL Server 2014 Performance Tuning and Optimization 55144; 5 Days; Instructor-led

CHAPTER 8: OPTIMIZATION AND TROUBLESHOOTING

50439B: Basics of Transact SQL with SQL Server 2008 R2

Greenplum Database (software-only environments): Greenplum Database (4.0 and higher supported, or higher recommended)

Monitoring PostgreSQL database with Verax NMS

PERFORMANCE TUNING IN MICROSOFT SQL SERVER DBMS

Citrix EdgeSight User s Guide. Citrix EdgeSight for Endpoints 5.4 Citrix EdgeSight for XenApp 5.4

SQL Server Performance Tuning and Optimization. Plamen Ratchev Tangra, Inc.

Diagnostics and Troubleshooting Using Event Policies and Actions

Capture Pro Software FTP Server System Output

Oracle Database Performance Management Best Practices Workshop. AIOUG Product Management Team Database Manageability

Windows 2003 Performance Monitor. System Monitor. Adding a counter

McAfee SIEM Alarms. Setting up and Managing Alarms. Introduction. What does it do? What doesn t it do?

PRODUCT OVERVIEW SUITE DEALS. Combine our award-winning products for complete performance monitoring and optimization, and cost effective solutions.

Enable Audit Events in MS SQL Server EventTracker v6.x, v7.x

"Charting the Course to Your Success!" MOC A Understanding and Administering Windows HPC Server Course Summary

SQL SERVER FREE TOOLS

Viewing and Troubleshooting Perfmon Logs

LogLogic Microsoft SQL Server Log Configuration Guide

11.1. Performance Monitoring

StreamServe Persuasion SP5 Microsoft SQL Server

There are numerous ways to access monitors:

Operating System and Process Monitoring Tools

Upgrading Your SQL Server 2000 Database Administration (DBA) Skills to SQL Server 2008 DBA Skills Course 6317A: Three days; Instructor-Led

Monitoring System Status

NUTECH COMPUTER TRAINING INSTITUTE 1682 E. GUDE DRIVE #102, ROCKVILLE, MD WEB: TEL:

Web Server (Step 1) Processes request and sends query to SQL server via ADO/OLEDB. Web Server (Step 2) Creates HTML page dynamically from record set

SQL 2012 Compatibility and Vista View Conversion. Presented By: Deepali Savkoor Ellucian June 12, 2014

Capture Pro Software FTP Server Output Format

WebSphere Business Monitor

SQL Server 2005 Implementation and Maintenance. 50 Cragwood Rd, Suite 350 South Plainfield, NJ 07080

Query Performance Tuning: Start to Finish. Grant Fritchey

Author: Ryan J Adams. Overview. Policy Based Management. Terminology

Oracle Database 11 g Performance Tuning. Recipes. Sam R. Alapati Darl Kuhn Bill Padfield. Apress*

Mind Q Systems Private Limited

Course Outline. SQL Server 2014 Performance Tuning and Optimization Course 55144: 5 days Instructor Led

DiskBoss. File & Disk Manager. Version 2.0. Dec Flexense Ltd. info@flexense.com. File Integrity Monitor

SQL Server 2012 Database Administration With AlwaysOn & Clustering Techniques

SQL Server Performance Assessment and Optimization Techniques Jeffry A. Schwartz Windows Technology Symposium December 6, 2004 Las Vegas, NV

SQL Server Performance Tuning for DBAs

SQL Server Automated Administration

Exercise Safe Commands and Audit Trail

$99.95 per user. SQL Server 2008/R2 Database Administration CourseId: 157 Skill level: Run Time: 47+ hours (272 videos)

RPM Utility Software. User s Manual

Extending Your Use of Extended Events

INTRODUCTION TO SYNTHESYS

Microsoft SQL Server 2012 Administration. Real-World Skills for MCSA Certification and Beyond (Exams , , and )

Acunetix Web Vulnerability Scanner. Getting Started. By Acunetix Ltd.

Solving Performance Problems In SQL Server by Michal Tinthofer

Using AppMetrics to Handle Hung Components and Applications

Once the product is installed, you'll have access to our complete User Guide from the client.

Oracle Database 11g: New Features for Administrators 15-1

WINDOWS PROCESSES AND SERVICES

VirtualCenter Database Performance for Microsoft SQL Server 2005 VirtualCenter 2.5

Also on the Performance tab, you will find a button labeled Resource Monitor. You can invoke Resource Monitor for additional analysis of the system.

SyncThru Database Migration

Database Maintenance Guide

Kaseya 2. Quick Start Guide. for VSA 6.1

Troubleshooting with the Nodus Scheduler

ORACLE DATABASE 11G: COMPLETE

Working with SQL Server Agent Jobs

Installation and Operation Manual Unite Log Analyser

Understanding Task Scheduler FIGURE Task Scheduler. The error reporting screen.

SQL SERVER DEVELOPER Available Features and Tools New Capabilities SQL Services Product Licensing Product Editions Will teach in class room

TSM Studio Server User Guide

MSSQL quick start guide

Setup and configuration for Intelicode. SQL Server Express

Performance and Reliability Monitoring Step-by-Step Guide for

Transcription:

SQL Server Profiler Presented By: Deepali Savkoor Ellucian Introduction This presentation is an introduction to the SQL Server Profiler tool. Step-by-step guide to setting up a trace. Identify server activities that can be monitored. Learn to analyze traces. 2 1

Agenda SQL Profiler highlights SQL Profiler concepts Analyze slow-running queries Analyze deadlocks Use with Windows performance log data Use with Database Engine Tuning Advisor SQL Trace 3 SQL Profiler Highlights It is a graphical tool used to monitor a database or Analysis Service instance. It can be run from Start menu or SSMS. It can be used to Debug database code to find a problem query. Diagnose slow-running queries. Monitor the performance of SQL Server. Audit actions performed for security. 4 2

SQL Profiler Concepts Some basic Profiler terms are Events : SQL Server actions captured, such as Start/End of a SQL statement. Event Category : a group of related events, for e.g. Stored Procedures. Event Class Type of event together with Data Columns that can be traced, for e.g. SP:Completed. 5 SQL Profiler Concepts Data Columns: attributes that describe the event, for e.g. Duration. Filter: Criteria that defines the subset of event data to be collected, e.g DBID = 4 Template: a trace configuration that can be re-used. It can be user-defined and saved as.tdf Trace: Data captured for selected events, data columns and filters. 6 3

SQL Profiler Tasks First select an existing template or create a new one for future re-use. 7 SQL Profiler Tasks Create a trace after connecting to server with the option of saving results and time to stop trace at. 8 4

SQL Profiler Tasks Select Events and Data columns to trace. Click Show All to see columns. Specify grouping of columns or the order in which you would like to display them. 9 SQL Profiler Tasks Filter events to capture only those that occur under specified circumstances like for a specific database if there are several on that server instance. 10 5

SQL Profiler Tasks Run the trace after it has been configured. You can pause, stop, clear the trace window, re-start the trace and search for a column value. You can open a saved trace and replay it too. 11 SQL Profiler Tasks Analyze the trace by stepping through the events. Select only those events and data columns that are relevant so that running the trace is not resource-intensive. 12 6

Analyze slow-running queries Run trace for a typical workload in a day. Check the queries with high duration. 13 Analyze Deadlocks SQL profiler can be used to identify deadlocks. Events and data columns can be selected as below. Filter could be by Database Name. 14 7

Analayze Deadlocks Run trace for 24hrs, if server overwhelmed then just capture Deadlock Graph event or run trace programmatically. Once the query and objects are identified, future deadlocks can be prevented. 15 Other Useful Events The Blocked Process Report event helps identify long-running blocked process It can be turned On/Off using the SP_CONFIGURE blocked process threshold command. 16 8

Other Useful Events Auto stats event helps determine if statistics are not updated enough or updated too often. SQL:StmtRecompiled event identifies and troubleshoots excessive statement compilations. Scan:Started event fires for every table and index scan and helps determine excessive scanning. Object and Security Audit events are useful for investigating specific database access problems. 17 Correlate Perfmon Data SQL profiler trace can be used in conjunction with Performance Monitor to pinpoint specific queries bringing down server performance. Create profiler trace with events and column as selected for the slow-running query. 18 9

Correlate Perfmon data - Collect Performance Monitor activity data in a log file by creating a Data Collector Set and selecting the performance counters to track. - Start and stop the Profiler trace and Perfmon Data Collector set at the same time and run them for a short interval during peak server loads. 19 Correlate Perfmon Data Open the Profiler.trc file and select File Import Performance Data. Map the spikes in performance counters with SQL statements. 20 10

Profiler and DTA The Database Engine Tuning Advisor (DTA) can accept a SQL profiler trace output file or table. It analyses the statements that are run, their frequency and any indexes used. It provide indexing recommendations that it can implement or allow one to review and selectively apply at a later time. 21 Profiler and DTA SQL Profiler provides a default Tuning template that can be used directly or modified slightly to create the trace. 22 11

Profiler and DTA Open the DTA GUI from Start menu or from within SQL Profiler and select the database and the.trc file as workload. Click the Start Analysis button. It gives us the recommendations and estimated percentage improvement. 23 SQL Trace System stored procs provided by TSQL to create and run a trace manually or from within an app without using SQL Profiler tool. sp_trace_create sp_trace_setevent sp_trace_setfilter sp_trace_setstatus 24 12

SQL Trace SQL trace is useful when there is a need to minimize overhead and have more control over the trace. One cannot organize columns or grouping with SQL Trace. The trace script can be generated from the Profiler GUI itself. Trace function, fn_trace_gettable, can be used to query the trace file. 25 SQL Trace 26 13

SQL 2012 Extended Events Light weight performance monitoring system comprising of system stored procedures introduced in SQL2008. SQL2012 now offers a GUI to setup the extended event sessions easily. Create a new Event Session Select a Template Pick Events to capture Start Session. You can even watch Live Data. 27 SQL 2012 Extended Events Choose Global Fields or Actions common to all events. Specify the Event Filters. Select the Event Session Target file to store results in. 28 14

SQL 2012 Extended Events 29 Summary SQL Server Profiler is a powerful graphical tool to debug, troubleshoot and monitor database activities. Traces can be created, started, saved and replayed for selected events, data and filters. It can be used to analyze slow queries, deadlocks, blocking, server performance. It can be used in conjunction with Performance Monitor and Database engine Tuning Advisor. 30 15

Summary Server-side SQL traces can be created programmatically. SQL2012 offers a GUI to manage Extended Events that works as an alternative to SQL Profiler. More information at http://technet.microsoft.com/en-us/library/ms181091.aspx Great resource Mastering SQL Server Profiler by Brad McGehee 31 SQL Server 2012 Compatibility Questions? 32 16

17