SQL Server – Setup SQL Profiler to Capture Costly Queries / Stored Procedures

  • Click Tools >​​ SQL Server Profiler

 

 

 

  • Connect to the instance

 

 

 

  • On this page, perform the following:

    • Indicate​​ Trace name

    • Choose ​​ “Tuning” template

    • Save to file

    • Set​​ 1000​​ maximum file size

    • Set trace stop time (optional. You may stop the trace anytime)

 

 

 

  • Go to​​ Events​​ Selection​​ tab

C:\Users\Ricky\AppData\Local\Temp\SNAGHTML4fc4102.PNG

 

 

  • Tick​​ Show all columns​​ and choose the following columns

 

 

 

  • Click​​ Column Filters

 

 

 

 

 

  • Filter​​ DatabaseName​​ and​​ Duration​​ (>= 500ms)

 

 

 

  • Click​​ Run

 

Knowledge worth sharing...Share on linkedin
Linkedin
Share on facebook
Facebook
Share on google
Google
Share on twitter
Twitter
Bookmark the permalink.

Leave a Reply

Leave a Reply

Your email address will not be published. Required fields are marked *