SQL Profiler

SQL Server Profiler is a graphical tool that allows you to monitor and collect server events such as:

  • Server connects and disconnects

  • Transact-SQL batches

  • The execution of statements within stored procedures

  • Deadlocks

  • Errors written to the SQL Server error log

This information can be displayed in SQL Server Profiler, stored in trace files, or saved in a Microsoft® SQL Server™ table. SQL Server Profiler can read trace files created in SQL Server Profiler or SQL Trace, as well as Transact-SQL scripts.

Examples of event data captured by SQL Server Profiler include:

  • The types (classes) of events being traced (e.g. SQLBatchCompleted)

  • The SQL Server name of the users performing activity in SQL Server

  • The text of Transact-SQL statements and stored procedures being executed

  • The duration of Transact-SQL and other types of events

  • The severity of errors

Event data can be filtered so that only a subset of the event data is collected. For instance, a filter can be defined to trace only those SQL:BatchCompleted events with a duration greater than one second.

Additionally, SQL Server Profiler allows captured event data to be replayed against SQL Server, thereby effectively re-executing the saved events as they occurred originally.

SQL Server Profiler can also be used to:

  • Monitor the performance of SQL Server.

  • Debug Transact-SQL statements and stored procedures.

  • Identify slow-executing queries.

  • Capture error information in the context of the queries being executed.

  • Identify scans of large tables.

Using SQL Profiler with Plant Applications

  • SQL Profiler is useful for troubleshooting spLocal_* stored procedures created specifically for sites

  • Allows you to see the values of the input parameters

  • Allows the capture of run statistics

  • Open an existing trace or create a new one

  • Save to a file

  • Send our support team a sample

  • Add filters to make traces more efficient and easier to read

  • Make traces more efficient and easier to read by using filters, such as:

  • LoginName=comxclient

  • TextData Like %splocal%

  • ApplicationName Like Plant Applications%

For more information, please see your SQL Server Books Online.