When I worked in CSS for MS there were a lot of cool internal tools we could use to help us in our day to day work, and this one tool is great for Microsoft error codes.
Over the years some of these have been made public – the most famous of which is PSSDIAG on codeplex, which was released with some fanfare (at least within the SQL community).
However, there’s one which is (arguably) even more useful as it doesn’t just apply to SQL Server. It’s called err.exe and was originally produced by the MS Exchange team. Essentially all it is is a command line tool to which the relevant error code is passed and it returns all the info it can find on it. Err.exe will look up just about any MS error code. It will dig out the full error message and which application/OS libraries it came from. It’s saved me from a lot of digging around and head-scratching in the past.
Download it. Extract it. Add the folder you’ve extracted it into to your path, and you’re done.
To use it, open a command prompt type “err ” and hit return as per the following screenshot:
I’ve searched for the 0x8009030c error (the dreaded “SSPI handshake failed with error code 0x8009030c” message) and the real beauty of this little tool is that it will accept either a decimal or hexadecimal value and it will show you the error message and which application header file it found the message in along with any additional information available in the header as the above example shows.
The next example shows a search for decimal code 170456 and the multiple places this error can be returned from:
I’ve found it extremely useful when looking up error codes in the SQL Server error log and the Windows event logs, and I’m sure it’ll save y’all time too…