How to monitor just t-sql commands in SQL Profiler?
Asked Answered
P

3

9

I have a trouble in monitoring t-sql commands, I want to monitor just commands like: select, insert, update or delete. Can anyone help me?

Philoprogenitive answered 7/9, 2013 at 3:35 Comment(0)
W
7

Pick a trace template (such as Tuning) and use a filter.

Either filter by a particular login (such as your own login or a service's login), or a particular database.

For instance, to filter by database: Under Trace properties -> Events tab -> Select show all columns. Set a Like filter on database name.

I find setting a filter on the number of Logical Reads of say > 10 reads, filters out most of the noise.

Worcestershire answered 7/9, 2013 at 4:6 Comment(0)
B
3

Download Express Profiler From CodePlex

You can get all your query after starting a trace. This can be used any machine.

Bardwell answered 7/9, 2013 at 4:20 Comment(1)
This is sooooo good. Beats having to install the clunky default SQL Profiler.Peripatetic
P
2
  • Open Sql Profiler from: Programs -> Microsoft SQL Server 2008 R2 -> Performance Tools -> SQL Server Profiler
  • Click on "New Trace" and Logon into database engine
  • Click on "Show all events" checkbox
  • In the events tree expand "TSQL" and check SQL:BatchCompleted, then check "Show all columns" and check item "TextData"
  • Click Run button.
Philoprogenitive answered 7/9, 2013 at 4:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.