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.
Steps:
SQL Server Management Studio
- Go to MS SQL Server Management Studio and select the database you want to trace in the Profiler.
- Right click the database and select New Query.
- In the query window type select db_id() then execute... and remember the number generated
SQL Server Profiler
- File - New Trace then choose server, Authentication Mode provide UserName and Password and click connect.
- In the trace properties go to events selection tab.
- click Show all events and Show all columns.
- Click Column Filters button
- click DatabaseID
- click Equals then input the DB ID generated before in the Mangement Studio
- Click Ok then click the Run Button
In sql Profiler go to File -> New Trace Enter your server name
In the next windows just click run and u ll see the trace commands
Execute few statements in your management studio and then check the profiler
来源:https://stackoverflow.com/questions/10845304/how-to-trace-with-sql-server-profiler