开发者

Checking number of DB calls

开发者 https://www.devze.com 2023-02-14 08:39 出处:网络
With respect to performance tuning, I would like to find out the number of DB calls each page is making. Also, the stored procedures and queries that is executed. I\'m using Asp.net and SQL Server 200

With respect to performance tuning, I would like to find out the number of DB calls each page is making. Also, the stored procedures and queries that is executed. I'm using Asp.net and SQL Server 2008. In some places we have directly written the query in C# insead of calling SP.

I tried using SQL Profiler. In that, under Event if I select SP, I'm able to trace the SP calls. But what about the queries that are direcly called in C#. How can I trace that.

Kindly let me kno开发者_Go百科w how this can be done or if there is a better tool to find this out.

Thanks in advance.


Use SQL Profiler to create a trace that logs these events:

  • RPC:Completed
  • SP:Completed
  • SP:StmtCompleted
  • SQL:BatchCompleted
  • SQL:StmtCompleted

See How Can I Log and Find the Most Expensive Queries?


When you open a new trace you can select the template TSQL Which will then include the event SQL:BatchStarting that will show you the queries as well

0

精彩评论

暂无评论...
验证码 换一张
取 消