How To: Use SQL Server Profiler To Help In Debugging Applications

Syed Aslam Basha here from the Information Security Tools team.

SQL profiler is a utility which can be used to track user and application activity, troubleshoot connection problems, or optimize SQL server. Here am going to show “How SQL server profiler can help in debugging applications with some DB issues”

For example, there can be issues like you launch application and perform registration, but when you try to login, it says user not registered. It can be due to wrong stored procedure(SP) being called or wrong values being passed to the SP. You can track user and application activity using SQL profiler as shown below:

  • Launch SQL server profiler
  • Click on New trace button
  • Enter server name and click on connect button
  • Click on Run
  • Re-execute the scenarios on the application
  • SQL server profiler records all user and application activity
  • Click on Stop trace button
  • Analyze the trace data
  • You can easily figure out as to what went wrong

SQLProf1

-Syed Aslam Basha ( syedab@microsoft.com )

Microsoft Information Security Tools (IST) Team

Test Lead

---------------------------------------------------------

Please leave a comment if the blog post has helped you.