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 spinlock contention), you'll need the correct symbol file (sqlservr.pdb) to go with sqlservr.exe of the instance you're interested in.

KB article 311503 has details on how to do this in general, but they're a little cryptic.

Assuming you've already installed the Windows debugging tools (32-bit or 64-bit), you'll have a tool called symchk in the folder where windbg resides (for my laptop, "C:\Program Files\Debugging Tools for Windows (x64)") - this is what will pull down sqlservr.pdb.

You need to point symchk at the executable you're interested in, tell it where to put the sqlservr.pdb, and tell it the location of the Microsoft symbol server.

For me, the following worked:

C:\>cd C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Binn

C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Binn>"C:\Program
 Files\Debugging Tools for Windows (x64)\symchk" sqlservr.exe /s SRV*c:\symbols*
http://msdl.microsoft.com/download/symbols

SYMCHK: FAILED files = 0
SYMCHK: PASSED + IGNORED files = 1

And then I copied the sqlservr.pdb into the \Binn directory.

Enjoy!

Comments

Comments are closed

Theme design by Nukeation based on Jelle Druyts