{"id":580,"date":"2011-04-13T04:03:00","date_gmt":"2011-04-13T04:03:00","guid":{"rendered":"\/blogs\/paul\/post\/How-to-download-a-sqlservrpdb-symbol-file.aspx"},"modified":"2021-12-20T13:34:27","modified_gmt":"2021-12-20T21:34:27","slug":"how-to-download-a-sqlservr-pdb-symbol-file","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-download-a-sqlservr-pdb-symbol-file\/","title":{"rendered":"How to download a sqlservr.pdb symbol file"},"content":{"rendered":"<p>I just had to figure out how to do this so I figured a quick blog post is in order to save other people time in future.<\/p>\n<p>If you ever need to use <em>windbg<\/em> to debug a SQL Server crash dump, or you want to capture call stacks using extended events (e.g. when debugging excessive spinlock contention), you&#8217;ll need the correct symbol file (<em>sqlservr.pdb<\/em>) to go with <em>sqlservr.exe<\/em> of the instance you&#8217;re interested in.<\/p>\n<p>[Edit: May 2016] Download and install the Windows debugging tools from the Windows SDK <a href=\"https:\/\/developer.microsoft.com\/en-us\/windows\/downloads\/windows-10-sdk\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>. This works on Windows Vista\u00a0through 10 and Windows Server through 2016.<\/p>\n<p>Now you&#8217;ll have a tool called <em>symchk<\/em> in the folder where <em>windbg<\/em> resides (for my laptop, <em>&#8220;C:\\Program Files (x86)\\Windows Kits\\10\\Debuggers\\x64&#8221;<\/em>) &#8211; this is what will pull down <em>sqlservr.pdb<\/em>.<\/p>\n<p>You need to point <em>symchk<\/em> at the executable you&#8217;re interested in, tell it where to put the <em>sqlservr.pdb<\/em>, and tell it the location of the Microsoft symbol server.<\/p>\n<p>For me, the following worked:<\/p>\n<p style=\"padding-left: 30px;\"><strong>C:\\Users\\Paul&gt;<\/strong>cd\u00a0C:\\Program Files\\Microsoft SQL Server\\MSSQL12.SQL2014\\MSSQL\\Binn<\/p>\n<p style=\"padding-left: 30px;\"><strong>C:\\Program Files\\Microsoft SQL Server\\MSSQL12.SQL2014\\MSSQL\\Binn&gt;<\/strong>&#8220;C:\\Program Files (x86)\\Windows Kits\\10\\Debuggers\\x64\\symchk&#8221; sqlservr.exe \/s SRV*c:\\symbols*http:\/\/msdl.microsoft.com\/download\/symbols<\/p>\n<p>(Some people need to use https instead of http I&#8217;ve heard.)<\/p>\n<p>Then go to the <em>c:\\symbols<\/em> directory, and find the directory called <em>sqlservr.pdb<\/em>. It will have one or more sub-directories with GUID names, so pick the one with today&#8217;s date and then copy the <em style=\"line-height: 23px;\">sqlservr.pdb<\/em>\u00a0from that directory into the <em style=\"line-height: 23px;\">\\Binn<\/em> directory.<\/p>\n<p>Again, the command string to use once you&#8217;re in the SQL Server Binn directory is:<\/p>\n<p>&#8220;C:\\Program Files (x86)\\Windows Kits\\10\\Debuggers\\x64<em>\\symchk<\/em>&#8220;<em>\u00a0sqlservr.exe \/s SRV*c:\\symbols*http:\/\/msdl.microsoft.com\/download\/symbols<\/em><\/p>\n<p>If you get an error &#8220;The filename, directory name, or volume label syntax is incorrect.&#8221;, the copy-paste inserted weird characters for the double-quotes so delete and reinsert them. Also make sure there&#8217;s a space between \/s and SRV.<\/p>\n<p>You&#8217;ll also need to do this for <em>sqlos.dll<\/em>, plus on \u00a0SQL Server 2012+ you&#8217;ll need to do it for <em>sqlmin.dll<\/em>,\u00a0<em>sqldk.dll, sqllang.dll, sqlboot.dll, <\/em>and on SQL Server 2014+ you&#8217;ll need to do <em>qds.dll<\/em>\u00a0and <em>sqltses.dll<\/em> too otherwise call stacks won&#8217;t resolve properly. I usually just replace sqlservr.exe in the command above with *.dll and then I&#8217;ve got all the symbol files possible, but you can save time by only doing it for the strictly necessary files.<\/p>\n<p>When you get to the analysis phase, if you don&#8217;t have all the correct\u00a0symbols, your call stack will look something like this (an example where sqlmin.pdb and sqllang.pdb are missing:<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; toolbar: true; wrap-lines: true; notranslate\" title=\"\">\r\nXeSosPkg::wait_info::Publish+138 &#x5B; @ 0+0x0\r\nSOS_Task::PreWait+176 &#x5B; @ 0+0x0\r\nOrdinal1132+9ab &#x5B; @ 0+0x0\r\nOrdinal1391+b8e &#x5B; @ 0+0x0\r\nOrdinal429+c4e &#x5B; @ 0+0x0\r\nOrdinal319+966 &#x5B; @ 0+0x0\r\n0x000007FEF20B04E2\r\n0x000007FEF20B0D27\r\n0x000007FEF20B1ACC\r\n0x000007FEF12204C1\r\n0x000007FEF123A54B\r\n0x000007FEF1239C84\r\n0x000007FEF125DC2F\r\n0x000007FEF1254EC7\r\nSOS_Task::Param::Execute+21e &#x5B; @ 0+0x0\r\nSOS_Scheduler::RunTask+a8 &#x5B; @ 0+0x0\r\nSOS_Scheduler::ProcessTasks+29a &#x5B; @ 0+0x0\r\nSchedulerManager::WorkerEntryPoint+261 &#x5B; @ 0+0x0\r\nSystemThread::RunWorker+8f &#x5B; @ 0+0x0\r\nSystemThreadDispatcher::ProcessWorker+3c8 &#x5B; @ 0+0x0\r\nSchedulerManager::ThreadEntryPoint+236 &#x5B; @ 0+0x0\r\nBaseThreadInitThunk+d &#x5B; @ 0+0x0\r\nRtlUserThreadStart+21 &#x5B; @ 0+0x0\r\n<\/pre>\n<p>Where it should resolve every frame in the call stack and look something like this (the same example with all pdbs in place):<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; toolbar: true; wrap-lines: true; notranslate\" title=\"\">\r\nXeSosPkg::wait_info::Publish+138 &#x5B; @ 0+0x0\r\nSOS_Task::PreWait+176 &#x5B; @ 0+0x0\r\nEventInternal::Wait+1e3 &#x5B; @ 0+0x0\r\nFCB::SyncWrite+104 &#x5B; @ 0+0x0\r\nDBMgr::CopyModel+fe &#x5B; @ 0+0x0\r\nDBMgr::CreateAndFormatFiles+966 &#x5B; @ 0+0x0\r\nCStmtCreateDB::CreateLocalDatabaseFragment+682 &#x5B; @ 0+0x0\r\nDBDDLAgent::CreateDatabase+f7 &#x5B; @ 0+0x0\r\nCStmtCreateDB::XretExecute+8fc &#x5B; @ 0+0x0\r\nCMsqlExecContext::ExecuteStmts&lt;1,1&gt;+400 &#x5B; @ 0+0x0\r\nCMsqlExecContext::FExecute+a33 &#x5B; @ 0+0x0\r\nCSQLSource::Execute+866 &#x5B; @ 0+0x0\r\nprocess_request+73c &#x5B; @ 0+0x0\r\nprocess_commands+51c &#x5B; @ 0+0x0\r\nSOS_Task::Param::Execute+21e &#x5B; @ 0+0x0\r\nSOS_Scheduler::RunTask+a8 &#x5B; @ 0+0x0\r\nSOS_Scheduler::ProcessTasks+29a &#x5B; @ 0+0x0\r\nSchedulerManager::WorkerEntryPoint+261 &#x5B; @ 0+0x0\r\nSystemThread::RunWorker+8f &#x5B; @ 0+0x0\r\nSystemThreadDispatcher::ProcessWorker+3c8 &#x5B; @ 0+0x0\r\nSchedulerManager::ThreadEntryPoint+236 &#x5B; @ 0+0x0\r\nBaseThreadInitThunk+d &#x5B; @ 0+0x0\r\nRtlUserThreadStart+21 &#x5B; @ 0+0x0\r\n<\/pre>\n<p>There&#8217;s also a video by Erin that shows the process to go through &#8211; see <a href=\"http:\/\/www.sqlskills.com\/InsiderContent\/201601\/January2016InsiderTip2.wmv\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>.<\/p>\n<p>Enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I just had to figure out how to do this so I figured a quick blog post is in order to save other people time in future. If you ever need to use windbg to debug a SQL Server crash dump, or you want to capture call stacks using extended events (e.g. when debugging excessive [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39,66,84,101],"tags":[],"class_list":["post-580","post","type-post","status-publish","format-standard","hentry","category-extended-events","category-performance-tuning","category-spinlocks","category-wait-stats"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to download a sqlservr.pdb symbol file - Paul S. Randal<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-download-a-sqlservr-pdb-symbol-file\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to download a sqlservr.pdb symbol file - Paul S. Randal\" \/>\n<meta property=\"og:description\" content=\"I just had to figure out how to do this so I figured a quick blog post is in order to save other people time in future. If you ever need to use windbg to debug a SQL Server crash dump, or you want to capture call stacks using extended events (e.g. when debugging excessive [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-download-a-sqlservr-pdb-symbol-file\/\" \/>\n<meta property=\"og:site_name\" content=\"Paul S. Randal\" \/>\n<meta property=\"article:published_time\" content=\"2011-04-13T04:03:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-20T21:34:27+00:00\" \/>\n<meta name=\"author\" content=\"Paul Randal\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Paul Randal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-download-a-sqlservr-pdb-symbol-file\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-download-a-sqlservr-pdb-symbol-file\/\",\"name\":\"How to download a sqlservr.pdb symbol file - Paul S. Randal\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\"},\"datePublished\":\"2011-04-13T04:03:00+00:00\",\"dateModified\":\"2021-12-20T21:34:27+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-download-a-sqlservr-pdb-symbol-file\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-download-a-sqlservr-pdb-symbol-file\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-download-a-sqlservr-pdb-symbol-file\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to download a sqlservr.pdb symbol file\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\",\"name\":\"Paul S. Randal\",\"description\":\"In Recovery...\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce\",\"name\":\"Paul Randal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g\",\"caption\":\"Paul Randal\"},\"sameAs\":[\"http:\/\/3.209.169.194\/blogs\/paul\"],\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/author\/paul\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to download a sqlservr.pdb symbol file - Paul S. Randal","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-download-a-sqlservr-pdb-symbol-file\/","og_locale":"en_US","og_type":"article","og_title":"How to download a sqlservr.pdb symbol file - Paul S. Randal","og_description":"I just had to figure out how to do this so I figured a quick blog post is in order to save other people time in future. If you ever need to use windbg to debug a SQL Server crash dump, or you want to capture call stacks using extended events (e.g. when debugging excessive [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-download-a-sqlservr-pdb-symbol-file\/","og_site_name":"Paul S. Randal","article_published_time":"2011-04-13T04:03:00+00:00","article_modified_time":"2021-12-20T21:34:27+00:00","author":"Paul Randal","twitter_misc":{"Written by":"Paul Randal","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-download-a-sqlservr-pdb-symbol-file\/","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-download-a-sqlservr-pdb-symbol-file\/","name":"How to download a sqlservr.pdb symbol file - Paul S. Randal","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website"},"datePublished":"2011-04-13T04:03:00+00:00","dateModified":"2021-12-20T21:34:27+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-download-a-sqlservr-pdb-symbol-file\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-download-a-sqlservr-pdb-symbol-file\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/how-to-download-a-sqlservr-pdb-symbol-file\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/paul\/"},{"@type":"ListItem","position":2,"name":"How to download a sqlservr.pdb symbol file"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/","name":"Paul S. Randal","description":"In Recovery...","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlskills.com\/blogs\/paul\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce","name":"Paul Randal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g","caption":"Paul Randal"},"sameAs":["http:\/\/3.209.169.194\/blogs\/paul"],"url":"https:\/\/www.sqlskills.com\/blogs\/paul\/author\/paul\/"}]}},"_links":{"self":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/580","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/comments?post=580"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/580\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/media?parent=580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/categories?post=580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/tags?post=580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}