Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preformance counter that logs contents of a querey 1

Status
Not open for further replies.

DriveByCheckmate

Programmer
Jun 2, 2008
19
US
Hi everyone,

I'm having a disk queue length issue and I'm trying to figure out what exactly is causing it.

What I'd like to do is setup a performance counter so that when disk queue goes over a certain point it will start logging the SQL queries that are being executed.

Anyone have any feedback on how that could be done or maybe have a better idea? Thanks!

FYI - we're using Microsoft SQL Express 2005.
 
What you could do is set up Permon to monitor and alert on your DQLs so that you have a "time" that the metric was exceeded.

Then, set up a Profiler trace to capture the TextData value of the SPIDs that are executing on your SQL Server instance.

Save the trace to a table preferable.

When Permon alerts you, you can then drill into the table with the Profiler trace records and find the records that are within the time range you are looking for.

A 3rd party tool like Quest Spotlight On SQL Server is a huge help in getting to this information from one management point.

Thanks

J. Kusch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top