Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am working on restructuring the database for a project that has hundreds of classic asp pages. I need to be able to find out which pages are executing which queries so that I can analyze the data. I am hoping there is some way to accomplish this without having to manually open each asp page and copy/paste the queries into a spreadsheet. I would imagine this should be something I could pull from possibly logs? Any info is appreciated.

  • IIS 7
  • MSSQL 2008 R2
  • Windows Web Server 2008 build 6001
share|improve this question

1 Answer 1

Unless logging was setup in the application, I can't think of a way to go to one spot and see which queries come from which pages.

If you don't want to have to open each page's code up or search through your code, you could try and look at SQL Server Profiler. Especially if you have a development/test environment (profiler can consume resources and slow down a production system and should be rarely used - server side traces instead should be or quick profiler traces here or there). Basically you could look at, say the RPC:Completed and SQL:BatchCompleted events to see queries that fire and complete, you could also look at the starting events instead if you have reason to believe queries are timing out/not completing. This is still manual, though, you'd have to access each page in order and remember that order or access a page, save the trace file and move on, etc.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.