My work is currently deleting lot of stored procedures, views, tables and so on.
My worry is that if we miss judge a object and it goes into production that we'll only catch the errors when an user reports it.
I've created an alert using type "SQL Server event alert" and severity 16 and checked the e-mail for operator.
So, time to test the task:
EXEC SomeObjectThatDoesNotExist
I've verified that it's a severity 16 by checking message table.
USE MASTER
SELECT *
FROM SYS.MESSAGES m
WHERE m.language_id = 1033 AND
m.message_id = 2812
But this does not raise an alert. Is it possible to raise an alert on object not been found?
RAISERROR('Hello', 16, 1) WITH LOG;
does it produce an alert?