Using Windbg to read sql servrer mdmp files

  • Hello,

    We had problem on a sql server 200 machine and i have a mini dump file and i want to take a look at it using windbg.

    I installed it on my machine and downloaded the symbols locally and tried it and i was not successful.

    The question is can i copy the dump file from server to my local machine and then run windbg to debug the file or do i have to install windbg on the server.

    Any help or any instructions how to do this would be greatly appreciated.

    Thanks in adnvance

  • Basically i am looking for what paths should i give for image and symbol files.

  • Hi Chinn,

    This is the easiest way to get setup:

    Download and install the debugging tools for windows - I prefer c:\debuggers but you can install it wherever you like.

    Then open a cmd prompt and type:

    set _NT_SYMBOL_PATH=srv*c:\debuggers\symbols*http://msdl.microsoft.com/download/symbols;C:\Program Files\Microsoft SQL Server\MSSQL\Binn

    then add your debuggers directory to the past statement

    set PATH=%PATH%;c:\debuggers

    change to the directory with your mini dump in and do either:

    windbg -z dumpFile.mdmp

    or cbd -z dumpfile.mdmp

    I prefer cdb but windbg gives you a gui.

    What I would do is in either application do a "kv 500" this will give you a stack trace, if you do a "!analyze -v" it might point you to what caused it - but beware that the command guesses at the cause it isn't 100%.

    To see if the symbols have loaded correctly do a "lmvl msqlservr" if it doesn't show the details of the file then do a "!sym noisy" and the ".reload sqlservr.exe" this will show you all the paths it is looking for the symbol and why each failed.

    Also have a look in the logs directory you should have a text file with the same name as the dump file (.txt) this has the stack trace of the thread that crashed and if it was associated with a spid then also the input and output buffers so you should be able to work out what sql caused the crash. The dump of the pss and execution context structures will give you the spid, the database, the current command and the line number of the t-sql that caused the crash.

    Ed

  • Hey ED !!

    Thanks a lot for the information..:)

    "More Green More Oxygen !! Plant a tree today"

  • ED,

    Thanks For your time and patience.

    This is really great information..

    Thanks Very Much!

  • no problem - if you aren't able to see anything feel free to post your dump file or send me a pm with it and i'll have a look.

  • Ed,

    If i am running Analyze v i am getting symbols not found and as you said if i do lmvl server and sym noisy and reload sql server.exe does it cause any hindernace to the sql server on the machine..

    By the way for some reason it didnt create a text file along with this dump i have see it create text files with some other dumps but with not this particular one.

    I will pm you a dump file..if you dont mind..

    thanks..

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply