January 8, 2002 at 9:40 am
MSSQL 7.0/2000
Is there a way to find the top 10 sql statements hitting a database?
January 8, 2002 at 9:42 am
Are you talking about the last ten statements? I would suggest using Profiler to capture what you are after. -JG
-JG
January 8, 2002 at 9:51 am
If you run Profiler, you can export the trace to a table and parse away. Either run the trace and have it dump to the table initially, or capture it and save after the fact. You can set your properties to catch the SQL Batch or the SQL Statement completed so far as granularity is concerned.
You may also want to take a look at this article from Andy:
http://www.sqlservercentral.com/columnists/awarren/profilerloggingresultstoatable.asp
K. Brian Kelley
http://www.sqlservercentral.com/columnists/bkelley/
K. Brian Kelley
@kbriankelley
January 8, 2002 at 11:26 am
January 8, 2002 at 9:34 pm
Steve has great taste in recommending suggestions! You'll be better off doing your analysis from a table, but Profiler does support some interesting grouping options you might want to explore for ad hoc work.
Andy
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply