Databases Reference
In-Depth Information
There's more...
If you are performing the task of identifying expensive queries on frequent basis, you may
want to use the same trace definition each time you run a trace. It's convenient to save our
trace definition as a trace template and use that template each time we run a trace.
Trace templates
Trace templates are the files that save the trace definition and trace properties. SQL Server
Profiler comes with some default trace templates. They are as follows:
F Blank
F SP_Counts
F Standard
F TSQL
F TSQL_Duration
F TSQL_Grouped
F TSQL_Locks
F TSQL_Replay
F TSQL_SPs
F Tuning
Each of the above trace templates has its own trace definition that can be used to start a new
trace. However, there are chances that the in-built templates may not have the settings which
you require for your regular task.
In this type of situation, creating and using trace template should be a practical thing. The
trace definition and settings that you normally use on regular basis or frequently can be saved
in a trace template file. For this, you just need to save a trace file as trace template in order to
create it. Once a trace template is created, it can be used for other trace sessions later on and
you do not need to perform the tedious task of playing with trace properties each time.
Creating trace with system stored
procedures
What if you have no SQL Server Profiler installed on your machine and want to create a trace?
What if you have SQL Server Profiler installed but the executable binary file of SQL Server
Profiler is corrupted and cannot be run? What if you want to automate completely the process
of capturing trace data as per your defined schedules so that you do not have to be physically
present to start and stop the traces? Is it possible to create a trace in this manner without
SQL Server Profiler?
 
Search WWH ::




Custom Search