2. About the Speaker SQL Server DeveloperBA Consultant Worked with SQL Server since 1999 Regular SQLSaturday speaker One of the organizers of PASS SQLRally 2011
3. What is Profiler? Client application on top of SQL Trace SQL Trace is: Method of monitoring events in SQL Server Based on a set a of stored procedures for defining events to monitor, columns to return, and filters.
4. Why use SQL Server Profiler? It’s FREE with SQL Server! It’s easy to use. To analyze and determine application behaviors To troubleshoot applications To performance tune To audit your SQL Server
5. How Does Profiler Work? Event Providers produce events Trace Controller handles traces and marks events to be traced Marked events are filtered and queued in buffers. There are 2 trace providers Rowset Provider – used by Profiler File Provider
7. Security Considerations Alter Trace permissions required (new to SQL Server 2005) Hides passwords in Create/Alter Login Encrypted code (SP’s, UDF’s, etc…) hidden.
8. Accessing Profiler Start –> Programs –> Microsoft SQL Server 2008 –> Performance Tools In SSMS under the Tools menu.
9. Demo Opening Profiler Connecting to a server Selecting a Template Saving a trace while executing Add/remove events Add/remove columns Add/remove filters
10. Demo Executing a trace Saving a custom template Saving a completed trace Re-opening a saved trace Saving a trace definition
11. Integrating with Perfmon Data Need a PerfMon log Need a saved trace with start and end time columns
13. Performance Considerations Using Profiler is more impactful than a server-side trace More events and columns = more impact Multiple small traces have less impact than one large trace Server-side tracing to a file has minimal impact on performance – see http://tinyurl.com/LinchiShea
14. Resources Microsoft SQL Server 2005 Unleashed Inside Microsoft® SQL Server(TM) 2005: Query Tuning and Optimization SQL Server 2005 Books On Line http://tinyurl.com/SimpleTalkDeadlocks http://tinyurl.com/DbJProfilerPart1 http://tinyurl.com/DbJProfilerPart2 http://tinyurl.com/PASSProfiler