{"id":409,"date":"2014-04-08T10:48:30","date_gmt":"2014-04-08T15:48:30","guid":{"rendered":"http:\/\/www.sqlfreelancer.com\/blog\/?p=409"},"modified":"2014-04-08T10:48:30","modified_gmt":"2014-04-08T15:48:30","slug":"creating-sql-server-performance-based-reports-using-excel","status":"publish","type":"post","link":"https:\/\/www.sqlfreelancer.com\/blog\/creating-sql-server-performance-based-reports-using-excel\/","title":{"rendered":"Creating SQL Server performance based reports using Excel"},"content":{"rendered":"<p>I\u2019m not a big fan of Performance Monitor but in this post we will review the steps in how to export the results so they can be read more easily in Excel.\u00a0 This post will not discuss how to setup a data collector set and will assume the reader already has results saved to the file system in a .blg file format.<\/p>\n<p>If you\u2019ve ever used PerfMon you\u2019ve probably noticed .blg files. These are the files that hold all of our performance data that we have collected over the past week. When you open this file in PerfMon it can be tedious work to get the data in a presentable form. Actually, I don\u2019t know if there\u2019s a good way to get this data in a presentable form using the PerfMon\u2019s GUI.<\/p>\n<p><a href=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-410\" alt=\"SQL Freelancer SQL Server PeSQL Freelancer SQL Server Perfmon Graph Excel\" src=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel.png\" width=\"624\" height=\"230\" srcset=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel.png 624w, https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-300x110.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/a><\/p>\n<p>First thing we need to do is to convert the .blg to .csv so we can open it in Excel. To convert this file open command prompt and navigate to the directory the file is located and type:<\/p>\n<p align=\"center\"><i>Relog SQL_BASELINE_20140128.blg \u2013f CSV \u2013o NewFile.csv<\/i><\/p>\n<p><a href=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-411\" alt=\"SQL Freelancer SQL Server Perfmon Graph Excel\" src=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-1.png\" width=\"624\" height=\"297\" srcset=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-1.png 624w, https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-1-300x142.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><br \/>\n<\/a>Once the command completes successfully, you should see the new file in the same directory:<\/p>\n<p><a href=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-412\" alt=\"SQL Freelancer SQL Server Perfmon Graph Excel\" src=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-2.png\" width=\"624\" height=\"160\" srcset=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-2.png 624w, https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-2-300x76.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/a><\/p>\n<p>Open NewFile.csv in Excel:<\/p>\n<p><a href=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-413\" alt=\"SQL Freelancer SQL Server Perfmon Graph Excel\" src=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-3.png\" width=\"624\" height=\"415\" srcset=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-3.png 624w, https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-3-300x199.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/a><\/p>\n<p>Not pretty huh? First thing we need to do is format the first column\u2026.which is the Date column. Change the text in the A1 cell from PDH-CSV 4.0\u2026. to DateTime:<\/p>\n<p><a href=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-414\" alt=\"SQL Freelancer SQL Server Perfmon Graph Excel\" src=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-4.png\" width=\"510\" height=\"356\" srcset=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-4.png 510w, https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-4-300x209.png 300w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/a><\/p>\n<p>Next, remove Row 2. We do not need this data. Also, highlight column A and right click anywhere in the column and choose Format Cells:<\/p>\n<p><a href=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-415\" alt=\"SQL Freelancer SQL Server Perfmon Graph Excel\" src=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-5.png\" width=\"370\" height=\"553\" srcset=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-5.png 370w, https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-5-200x300.png 200w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/><\/a><\/p>\n<p>On the number tab, click the Data Category and select 3\/14\/2012 1:30PM:<\/p>\n<p><a href=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-6.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-416\" alt=\"SQL Freelancer SQL Server Perfmon Graph Excel\" src=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-6.png\" width=\"542\" height=\"472\" srcset=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-6.png 542w, https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-6-300x261.png 300w\" sizes=\"auto, (max-width: 542px) 100vw, 542px\" \/><\/a><\/p>\n<p>Press Ctrl+Home to select the A1 cell.<\/p>\n<p><b>Create Pivot Chart<\/b><\/p>\n<p>Click on the Insert tab and select Pivot Chart:<\/p>\n<p><a href=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-417\" alt=\"SQL Freelancer SQL Server Perfmon Graph Excel\" src=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-7.png\" width=\"624\" height=\"188\" srcset=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-7.png 624w, https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-7-300x90.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/a><\/p>\n<p>The Pivot Chart dialog box should automatically select the correct cells to analyze. If not, make sure all of the cells are selected:<\/p>\n<p><a href=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-418\" alt=\"SQL Freelancer SQL Server Perfmon Graph Excel\" src=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-8.png\" width=\"403\" height=\"333\" srcset=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-8.png 403w, https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-8-300x247.png 300w\" sizes=\"auto, (max-width: 403px) 100vw, 403px\" \/><\/a><\/p>\n<p>Once the new worksheet opens, drag DateTime to the Axis Fields pane:<\/p>\n<p><a href=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-9.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-419\" alt=\"SQL Freelancer SQL Server Perfmon Graph Excel\" src=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-9.png\" width=\"251\" height=\"627\" srcset=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-9.png 251w, https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-9-120x300.png 120w\" sizes=\"auto, (max-width: 251px) 100vw, 251px\" \/><\/a><\/p>\n<p>Now, depending on what counter(s) you want to analyze, drag it down to the Values pane. For this example, I\u2019ll analyze Processor(_Total)\\% Processor Time:<\/p>\n<p><a href=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-10.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-420\" alt=\"SQL Freelancer SQL Server Perfmon Graph Excel\" src=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-10.png\" width=\"416\" height=\"627\" srcset=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-10.png 416w, https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-10-199x300.png 199w\" sizes=\"auto, (max-width: 416px) 100vw, 416px\" \/><\/a><\/p>\n<p>Ta da! You now have a graph that displays your Processor %.<\/p>\n<p><a href=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-11.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-421\" alt=\"SQL Freelancer SQL Server Perfmon Graph Excel\" src=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-11.png\" width=\"604\" height=\"420\" srcset=\"https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-11.png 604w, https:\/\/www.sqlfreelancer.com\/blog\/wp-content\/uploads\/2014\/04\/SQL-Server-Perfmon-Graph-Excel-11-300x208.png 300w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/a><\/p>\n<p>To make this presentable, simply format the graph to your liking and you\u2019re done.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I\u2019m not a big fan of Performance Monitor but in this post we will review the steps in how to export the results so they can be read more easily in Excel.\u00a0 This post will not discuss how to setup a data collector set and will assume the reader already has results saved to the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[66,9,97],"class_list":["post-409","post","type-post","status-publish","format-standard","hentry","category-performance-tuning","tag-excel","tag-perfmon","tag-performance-tuning"],"_links":{"self":[{"href":"https:\/\/www.sqlfreelancer.com\/blog\/wp-json\/wp\/v2\/posts\/409","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlfreelancer.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlfreelancer.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlfreelancer.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlfreelancer.com\/blog\/wp-json\/wp\/v2\/comments?post=409"}],"version-history":[{"count":1,"href":"https:\/\/www.sqlfreelancer.com\/blog\/wp-json\/wp\/v2\/posts\/409\/revisions"}],"predecessor-version":[{"id":422,"href":"https:\/\/www.sqlfreelancer.com\/blog\/wp-json\/wp\/v2\/posts\/409\/revisions\/422"}],"wp:attachment":[{"href":"https:\/\/www.sqlfreelancer.com\/blog\/wp-json\/wp\/v2\/media?parent=409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlfreelancer.com\/blog\/wp-json\/wp\/v2\/categories?post=409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlfreelancer.com\/blog\/wp-json\/wp\/v2\/tags?post=409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}