SQL Server Error handling problems part 2

SQL Server 2000 has even more error handling problems than I blogged about before.

It would appear that error handling has not been thought through at all.

Take the RAISERROR command as an example. This appears to be a very elegant means of raising errors to the user.  You only need to use sp_addmessage to register a new message. The problem is that the messages are server global.

This means that if you server is ever to host a third party application you cannot safely define your own messages for fear of a third party app stamping all over them.  This should be scoped at a database level, providing at least some control.

The more I look at sql server error handling the more depressed I get. 

Leave a comment