Thursday, April 9, 2009

using SQL Profiler to monitor database calls

just in case anyone’s not familiar with SQL Profiler: this is the app that gives you low-level database monitoring so you can trace all database calls. you can customize what you monitor to get a variety of information.

so for example, if you want to set up a trace to see all database calls from your web server, launch Profiler, click the New Trace… button, connect locally, and go to the second tab:
  • check checkboxes in the DatabaseName column
  • click the Column Filters… button and add filters for:
    o DatabaseName Like => your database
    o NTUserName Like => nt identity you run your webserver as
    o TextData Like => exec

No comments: