How to trace with SQL Server profiler

17.4k Views Asked by At

i am trying my hands on SQL server profiler i would like to know how to trace using SQL server profiler. any link with apprpiate GUI will be more then helpfull.

2

There are 2 best solutions below

0
On

Steps:

SQL Server Management Studio

  1. Go to MS SQL Server Management Studio and select the database you want to trace in the Profiler.
  2. Right click the database and select New Query.
  3. In the query window type select db_id() then execute... and remember the number generated

SQL Server Profiler

  1. File - New Trace then choose server, Authentication Mode provide UserName and Password and click connect.
  2. In the trace properties go to events selection tab.
  3. click Show all events and Show all columns.
  4. Click Column Filters button
  5. click DatabaseID
  6. click Equals then input the DB ID generated before in the Mangement Studio
  7. Click Ok then click the Run Button
0
On

In sql Profiler go to File -> New Trace Enter your server name

SQL Profiler

In the next windows just click run and u ll see the trace commands Trace

Execute few statements in your management studio and then check the profiler