Custom SQL Server Error Messages

Kenneth Fisher shows how you can build your own custom SQL Server error messages:

I’m sure lots of you have used the function RAISERROR to handle an error caused by your code. The problem is, what do you do if the error you want to display isn’t one that Microsoft choose to include in the list of errors? (sys.messages)

You have two options. 

Read on for those options.

Related Posts

Reading SQL Server Error Logs

Thomas Rushton has a script for us: Why Script This? What’s Wrong With SSMS’s GUI?Well, although SSMS does allow you to look at the error logs, it’s not very helpful for filtering – you can only filter for items that match, rather than exclude items. There are a few other filters as well – I […]

Read More

SQL Server 2017 and Visual Studio 2017/2019 Installation Error

Hamish Watson walks us through an error which happens when you install SQL Server 2017 and Visual Studio 2019 in the “wrong” order: This blog post is about a situation that initially perplexed me – I was installing SQL Server 2017 onto a new DEMO machine – running Windows Server 2019. This install is one […]

Read More

Categories

July 2019
MTWTFSS
« Jun Aug »
1234567
891011121314
15161718192021
22232425262728
293031