Question: How to Convert Hex Windows Error Codes to the Meaningful Error Message – 0x80040002 and 0x80040005 and others?
Answer: This blog is not specific to SQL Server, but I have recently seen hex error codes in SQL Server ERRORLOG and it took me little time to get the meaning of it. In this blog, we would learn about how to convert a hex windows error codes to meaningful error messages.
Here are the few sample error codes which can be seen in Windows:
It would be humanly impossible to remember the meaning of all the codes. Here are the simple steps to get an error message. Let’s pick 0x80070070 as an example.
- Make note of the last four numbers of the code – 0070 from the example.
- Convert the hex number to decimal number using a calculator.
So, Hex 70 = Dec 112.
- Use command prompt and use the command “NET HELPMSG ” followed by the decimal number. 112 in our example.
The output of the command is “There is not enough space on the disk.”
Here are some most common hex codes and their meaning, just to save some time for you.
|0x80040002||The system cannot find the file specified.|
|0x80040003||The system cannot find the path specified.|
|0x80040005||Access is denied.|
|0x80070005||Access is denied.|
|0x80040005||Not enough memory resources are available to process this command.|
|0x80070490||Element not found.|
|0x8007054f||An internal error occurred.|
|0x80070bc2||The requested operation is successful. Changes will not be effective until the system is rebooted.|
|0x80070070||There is not enough space on the disk.|
|0x80070643||Fatal error during installation.|
Hope you would find this blog useful to learn the trick to covert the hex code to a meaningful message.
Reference: Pinal Dave (http://blog.SQLAuthority.com)