千家信息网

如何从Error Code获取Message

发表于:2024-10-04 作者:千家信息网编辑
千家信息网最后更新 2024年10月04日,如何从Error Code获取Message1. Windows下根据错误代码号打印错误消息命令Net helpmsg"displays information about Windows netwo
千家信息网最后更新 2024年10月04日如何从Error Code获取Message

如何从Error Code获取Message


1. Windows下根据错误代码号打印错误消息

命令Net helpmsg

"displays information about Windows network messages (such as error, warning, and alert messages). When you type NET HELPMSG and the 4-digit number of the Windows error (for example, NET 2182), Windows tells you about the message and suggests action you can take to solve a problem."

等价的PowerShell方法,可参考:PowerShell equivalent of NET HELPMSG


2. 非Windows平台

可参考:Errno Codes by Platform、Linux Error Codes Number on Linux Fedora System


3. MySQL error

perror命令是MySQL数据库系统中的一个工具程序,它用于打印C语言中errno错误代码的含义、也可以打印MySQL中存储引擎错误代码的含义。(perror prints a description for a system error code or for a storage engine (table handler) error code.)

可参考:Linux命令之perror - 解释错误代码


4. Oracle error

"ORA-XXXX"是DBA们常见的错误类型,一般情况下我们可以在网上搜索带相关解释及处理方案,如果事故现场不能上互联网,而出现的错误又未曾遇到,那我们该怎么办呢?

强大的ORACLE早已为我们考虑到这一点并提供了一个简单实用的工具:oerr,在linux或unix环境下,通过这个工具,可以快速找到相应错误代码的概述及解决方案。

可参考:oracle通过oerr快速找到相应错误代码的概述及解决方案


5. SQL Server error

系统视图sys.sysmessages针对每个可由 SQL Server 数据库引擎返回的系统错误或警告都包含相应的一行。 数据库引擎在用户屏幕上显示错误说明。

SELECT * FROM [sys].[messages] WHERE message_id IN (41034,41005) AND language_id=1033

可参考:sys.sysmessages

0