{"id":10534,"date":"2019-07-18T14:40:35","date_gmt":"2019-07-18T14:40:35","guid":{"rendered":"https:\/\/ittutorial.org\/?p=10534"},"modified":"2020-10-11T14:15:41","modified_gmt":"2020-10-11T14:15:41","slug":"using-sql-server-profiler-sql-server-performance-troubleshooting-5","status":"publish","type":"post","link":"https:\/\/ittutorial.org\/using-sql-server-profiler-sql-server-performance-troubleshooting-5\/","title":{"rendered":"Using SQL Server Profiler | SQL Server Performance Troubleshooting -5"},"content":{"rendered":"<p>Hi,<\/p>\n<p>I will continue to explain how to Troubleshoot Performance problems of SQL Server in this Article Series.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5153\" src=\"https:\/\/salihdeveci.files.wordpress.com\/2019\/01\/interrelated_systems.gif\" alt=\"\" width=\"348\" height=\"348\" \/><\/p>\n<p><!--more--><\/p>\n\n<p>&nbsp;<\/p>\n<h1><span style=\"color: #ff0000;\">SQL Server Performance Troubleshooting<\/span><\/h1>\n<p>&nbsp;<\/p>\n<p>Read previous article before this.<\/p>\n<p>https:\/\/ittutorial.org\/sql-server-performance-troubleshooting-4-using-dmv-dynamic-management-view-and-dmf-dynamic-management-function\/<\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"color: #ff0000;\">SQL Server Profiler<\/span><\/h2>\n<p>&nbsp;<\/p>\n<h3><span style=\"color: #ff0000;\">Examine Real time activities in a database using SQL Server Profiler<\/span><\/h3>\n<p>Using the SQL Server Profiler tool, you can determine what the problem within\u00a0the SQL Server Database. The following issues can be detected with the SQL ServerProfiler tool.<\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li>TOP Queries<\/li>\n<li>Durations<\/li>\n<li>Deadlock<\/li>\n<li>Lock<\/li>\n<li>Trace Database<\/li>\n<li>Trace Sessions<\/li>\n<li>Monitoring the status of running Batch jobs such as Stored Procedure<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>You can run SQL Server Profiler as follows and start the Trace.<\/p>\n<p>Type Trace Name as follows and you can use the old template. And also you can save this Trace file to Disk or Database.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10547\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler1.jpg\" alt=\"\" width=\"1255\" height=\"756\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler1.jpg 1255w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler1-300x181.jpg 300w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler1-768x463.jpg 768w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler1-1024x617.jpg 1024w\" sizes=\"auto, (max-width: 1255px) 100vw, 1255px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n\n<p>&nbsp;<\/p>\n<p>All events that you can trace are like following.<\/p>\n<p>You can trace Database, Locks,Performance, T-SQL, Stored Procedure and more.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10548\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler2.jpg\" alt=\"\" width=\"1181\" height=\"659\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler2.jpg 1181w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler2-300x167.jpg 300w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler2-768x429.jpg 768w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler2-1024x571.jpg 1024w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler2-800x445.jpg 800w\" sizes=\"auto, (max-width: 1181px) 100vw, 1181px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>For example; If you want to trace SQL Statements, you can enable this event by clicking related CheckBox like following.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10549\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler3.jpg\" alt=\"\" width=\"1191\" height=\"663\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler3.jpg 1191w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler3-300x167.jpg 300w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler3-768x428.jpg 768w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler3-1024x570.jpg 1024w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler3-800x445.jpg 800w\" sizes=\"auto, (max-width: 1191px) 100vw, 1191px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n\n<p>Or If you want to trace Locks, then Click Locks section and enable related events by clicking related CheckBox like following.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10550\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler4.jpg\" alt=\"\" width=\"1189\" height=\"663\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler4.jpg 1189w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler4-300x167.jpg 300w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler4-768x428.jpg 768w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler4-1024x571.jpg 1024w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler4-800x445.jpg 800w\" sizes=\"auto, (max-width: 1189px) 100vw, 1189px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>You can also trace Stored Procedures.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10570\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler6.jpg\" alt=\"\" width=\"1189\" height=\"658\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler6.jpg 1189w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler6-300x166.jpg 300w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler6-768x425.jpg 768w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler6-1024x567.jpg 1024w\" sizes=\"auto, (max-width: 1189px) 100vw, 1189px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>And you can trace all TSQL Statements running at the database by clicking related CheckBox.<\/p>\n<p>You can also filter this Trace result. I recommended you that make sure using Filter to see just only related results.<\/p>\n<p>If you don&#8217;t use Filter, then you will see all results. Mostly I am using Duration Filter,DBUserName,DatabaseName and ApplicationName to trace just only see healthy results.<\/p>\n<p>For example, I want to see all Statements that duration is greater than or equal to 5000 (ms). I will trace only statements that duration is greater than 5 sec in this case.<\/p>\n<p>You can trace TOP SQL and duration of Statements using Filter.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10551\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler5.jpg\" alt=\"\" width=\"1190\" height=\"659\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler5.jpg 1190w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler5-300x166.jpg 300w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler5-768x425.jpg 768w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler5-1024x567.jpg 1024w\" sizes=\"auto, (max-width: 1190px) 100vw, 1190px\" \/><\/p>\n<p>&nbsp;<\/p>\n\n<p>When you Click OK button and start Run Trace, Statements and Stored Procedure events will be traced like following.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10571\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler7.jpg\" alt=\"\" width=\"1920\" height=\"831\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler7.jpg 1920w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler7-300x130.jpg 300w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler7-768x332.jpg 768w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler7-1024x443.jpg 1024w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>I will continue to explain\u00a0SQL Server Performance Troubleshooting in the next article.<\/p>\n<p>https:\/\/ittutorial.org\/sql-server-performance-troubleshooting-6-collect-performance-data-using-sqldiag-tool\/<\/p>\n<div id=\"ittut-1160563078\" class=\"ittut-after-content\"><\/div>\n<div><\/div>\n<p>&nbsp;<\/p>\n<h4><span style=\"color: #ff0000;\">Do you want to learn Microsoft SQL Server DBA Tutorials for Beginners, then read the following articles.<\/span><\/h4>\n<blockquote class=\"wp-embedded-content\" data-secret=\"4dcc3sF67m\"><p><a href=\"https:\/\/ittutorial.org\/sql-server-mssql-dba-database-tutorials-for-beginners-database-administrators\/\">SQL Server ( MSSQL DBA ) Database Tutorials for Beginners Database Administrators<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;SQL Server ( MSSQL DBA ) Database Tutorials for Beginners Database Administrators&#8221; &#8212; IT Tutorial\" src=\"https:\/\/ittutorial.org\/sql-server-mssql-dba-database-tutorials-for-beginners-database-administrators\/embed\/#?secret=MGg5iVEtIl#?secret=4dcc3sF67m\" data-secret=\"4dcc3sF67m\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, I will continue to explain how to Troubleshoot Performance problems of SQL Server in this Article Series.<\/p>\n","protected":false},"author":1,"featured_media":10548,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2227],"tags":[5335,5344,5328,5348,5352,5349,5350,5351,5353,5354,5332,5339,5395,5345,5342,5334,5340,1659,5330,5341,5338,5337,5343,5336,1661,5333,5397,5400,5398,5396,5399,5394,5401,5329,5331,5347],"class_list":["post-10534","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-sql-server-2","tag-a-dba-guide-to-sql-server-performance-troubleshooting-part-1","tag-activity-monitor","tag-database-performance-issues-and-solutions","tag-difference-between-dmv-and-dmf-in-sql-server","tag-dmv-commands-in-sql-server","tag-dmv-in-sql-server-with-examples","tag-dmv-performance-sql-server","tag-dmv-to-check-sql-server-performance","tag-dmvs-in-sql-server-2016","tag-dynamic-management-view-is-a-type-of","tag-how-to-check-why-sql-server-is-slow","tag-how-to-improve-sql-server-performance","tag-install-sql-server-profiler","tag-monitoring-performance-counters-via-perfmon","tag-optimize-sql-server-performance","tag-sql-server-dba-real-time-issues","tag-sql-server-performance-monitor","tag-sql-server-performance-troubleshooting","tag-sql-server-performance-tuning","tag-sql-server-performance-tuning-interview-questions","tag-sql-server-performance-tuning-scripts","tag-sql-server-performance-tuning-tools","tag-sql-server-performance-tuning-training","tag-sql-server-performance-tuning-tutorial","tag-sql-server-performans-tuning","tag-sql-server-problems-and-solutions","tag-sql-server-profiler-17-download","tag-sql-server-profiler-2014","tag-sql-server-profiler-2016-download","tag-sql-server-profiler-2017-download","tag-sql-server-profiler-deprecated","tag-sql-server-profiler-download","tag-sql-server-profiler-filter-by-database","tag-troubleshooting-performance-problems-in-sql-server","tag-troubleshooting-sql-queries","tag-using-dmv-dynamic-management-view-and-dmf-dynamic-management-function"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/07\/SQLServer-Profiler2.jpg","jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/10534","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/comments?post=10534"}],"version-history":[{"count":5,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/10534\/revisions"}],"predecessor-version":[{"id":19866,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/10534\/revisions\/19866"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/media\/10548"}],"wp:attachment":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/media?parent=10534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/categories?post=10534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/tags?post=10534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}