简体   繁体   English

在 SQL 服务器中哪里可以找到自定义错误消息?

[英]Where to find a custom error message in SQL Server?

自定义错误消息

I'm running a stored procedure in SQL Server and I'm getting the above error.我正在 SQL 服务器中运行存储过程,但出现上述错误。 I assume that this is a custom error because it is business-specific and also the word "because" is misspelled.我认为这是一个自定义错误,因为它是特定于业务的,而且“因为”这个词拼写错误。 But this text does not appear in the stored procedure text.但此文本不会出现在存储过程文本中。 Where can I find this error message so that I can determine why it is appearing?我在哪里可以找到此错误消息,以便确定它出现的原因?

There is most likely a custom error message in the sys.messages table. sys.messages表中很可能存在自定义错误消息。 Look for either the THROW or RAISERROR that is using a message id greater than 50000. That should tell you where the error is coming from and also you can correct the spelling mistake.查找使用大于 50000 的消息 id 的THROWRAISERROR 。这应该告诉您错误来自哪里,您也可以更正拼写错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM