920
Part VII: Monitoring and Auditing
Running Profi ler
SQL Server Profiler can be opened from several locations:
■ (^) From the Start menu, Profiler is under the SQL Server 2012 ➪ Performance Tools menu.
■ (^) In Management Studio, Profiler is in the Tools menu.
■ (^) Within Management Studio’s Query Editor, the context menu includes the option to
Trace Query in SQL Server Profiler. This option opens Profiler filtered to the current
connection.
Defi ning a New Trace
When a new trace is created (with the New Trace toolbar button or File ➪ New Trace), a
connection is created to a SQL Server, and the Trace Properties dialog (see Figure 38-1)
displays. The Trace Properties General tab sets up the trace (name, file destination, and
so on), and the Events Selection tab defines the events and data columns to be recorded,
as well as the filter. If the trace is running, the properties may be viewed but not
changed. You can save a trace configuration as a template to make creating new traces
easier.
FIGURE 38-1
This SQL Server Profi ler uses the T-SQL Duration template and can write information to a fi le.
c38.indd 920c38.indd 920 7/31/2012 10:04:18 AM7/31/2012 10:04:18 AM
http://www.it-ebooks.info