SQL Profiler
·
Open Profiler we can write profiler in SQL 2008 and profiler90 in SQL 2005 in Run.
·
Create your connection to server using Ctrl +
N. Below screen will come
o
You can connect server using SQL
authentication or Window Authentication.
· After connect will display the ‘Trace Properties’ screen. On
this screen you can enter the trace name. You will notice that trace provider
name, type and versions are per-populated and cannot be altered. These are set
based on which SQL Server instance you are connected with.
· The ‘Trace Properties’ screen contains a
drop-down for template selection, which is labeled with ‘Use the template’. As
mentioned earlier, the default template selected is Tuning. We can see what
events are included in the Tuning template in the next tab, ‘Events Selection’.
· The ‘Event selection’ screen contains a check box
that can be configured as per the requirement of data to be collected. The same
screen contains a ‘Column Filters’ button, which when clicked brings up another
screen that can be used to further filter trace data.
· There is another button named ‘Organize Columns’
on the same screen. This screen can be used to organize and group columns.
Please note that columns cannot be grouped or ordered once the process of trace
collection has begun.
The ‘Trace Properties’ screen contains a ‘Run’ button. When you click on
this button, it runs the trace. The trace can be paused or stopped as required
using the play menu on top.\
· This data can be saved in database and trace
file or saved as XML. Trace file can be imported back in profiler, and profiler
can re-run the whole scenario. Once the trace file is saved in database table,
it can be queried by using T-SQL.
No comments:
Post a Comment