4

I have a third party application developed in C# running as Windows service, I wanted to trace all SQL code that the application fired to the backend (SQL server). so started SQL profiler and collected all the trace steps. After investigating each and every step generated from SQL profiler, could not find some of the SQL code but without which the respective tables could not have updated.

Is it possible to suppress SQL code not be captured from SQL profiler ? What could have happened ?

PS - I am testing on isolated environment, no other process would have changed

  • 3
    Check your profiler capture settings. You might have an exclusion rule somewhere. – Dai Aug 14 '14 at 22:51

2 Answers2

2

SQL Server Profiler has the ability to record/Monitor pretty much everything going on in SQL Server, it depends how you set it up before firing it up.

It is just possible you didnt select the events before you started the profiler. The event you think is missing from profiler.

You cannot hide SQL Statement from profiler, it will record every activity in SQL Server as long as it is setup to record that particular event.

There is a check box to show you more options for recording more detailed events, see below....

enter image description here

Note

This is a very resource intensive tool, use wisely :)

M.Ali
  • 67,945
  • 13
  • 101
  • 127
  • I agree - its very easy to accidentally exclude events in Profiler. For example do you have these turned on? http://stackoverflow.com/questions/159526/how-to-get-sql-profiler-to-monitor-trigger-execution – Nick.Mc Aug 14 '14 at 22:55
  • I agree & i used it many times, I can notice many events captured but i am not seeing few which supposed to happen, which why it breaking my head what else could have happened. Thank you for sharing your views. – user3412047 Aug 15 '14 at 13:20
-1

Profiler can fail to collect events, especially if the system is busy. You're better of using Extended Events.

Michael Green
  • 1,397
  • 1
  • 17
  • 25
  • I think that is not, at least in my case, as i mentioned the environment is isolated from all other users and explicitly used for this purpose only. And i don't think performance is the problem. But i take your point and thank you for sharing your views. – user3412047 Aug 15 '14 at 13:22