Databases Reference
In-Depth Information
There's more...
This section covers some essential information on SQL Trace that you must know if you want
to master SQL Tracing. It is advised that even if you are an advanced user, you do not skip
this section.
Some background of SQL Trace
Follow this section in order to have an in-depth understanding of SQL Trace and its architecture.
SQL Trace terms and concepts
Understanding the SQL Trace and its architecture by knowing its related terms and concepts is
a prerequisite for working with SQL Server Profiler effectively. This section discusses the basic
terminologies and concepts of SQL Trace in brief.
SQL Trace
SQL Trace is an event monitoring and capturing engine that comes with SQL Server. It
provides the capability to capture the database events with event data and create traces
that can be used for performance analysis afterwards.
SQL Server Profiler.
SQL Server Profiler is a graphical user interface tool for working with SQL Trace. Behind the
scene, it uses the same SQL Trace engine, but additionally provides graphical user interface
to the user for working with traces. SQL Server Profiler provides functionalities, such as
displaying collected event data on its graphical interface, saving traces either in a file or in an
SQL Server table, opening previously saved traces, extracting T-SQL statements from a trace,
and many more. Finding and analyzing long running or costly queries, finding deadlocks and
their related information, looking for which indexes are scanned, and looking for database
connection requests are some of the practical applications of SQL Server Profiler.
Event
In context of SQL Trace terminology, an event is the happening of a database activity that
takes place within an instance of SQL Server. Execution of an ad-hoc query or T-SQL batch,
a call to stored procedure, an attempt to log in or log out from database server are a few
examples that raise specific SQL Server events.
Event class
An event class describes a specific type of event. There are many different types of
events that can occur within the database engine and each type of event is represented
by an event class. Audit Login , Audit Logout , SP:Completed , SP:Recompile ,
SQL:BatchCompleted , Lock:Deadlock are some of the examples of event classes.
To get list of all available event classes, you can query sys.trace_events catalog view.
 
Search WWH ::




Custom Search