question

jangi avatar image
jangi asked

SQL SERVER ERROR email alert

Hi All,


We have thousands of stored procedure which are not in use and we decided to drop them all (I didn't get this unused stored procs info from any user, we logged all stored procedures which are in use. By that, we got details of unused stored procs).


Now, after dropping stored procs. If any user or from application calls stored procedure it normally throws error, which is like:

Msg 2812, Level 16, State 62, Line 1

Could not find stored procedure 'sp_wh'.


I need an email alert whenever my instance throws this error.


I have tried with ALERTS option under sql server agent which is not working. Also, I checked in errorlog if we can insert the log details in to a table, and this error is not logging.


NEED HELP...................... :)

sql2014sqlerror
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

anthony.green avatar image anthony.green commented ·

SQL Alerts under the agent should work for you.

How have you configured the alert and the database mail to do this for you?

Can you send mail normally via sp_send_dbmail?

0 Likes 0 ·

1 Answer

·
Willjoe2442 avatar image
Willjoe2442 answered

View the logs

In SQL Server Management Studio, select Object Explorer.

In Object Explorer, connect to an instance of SQL Server, and then expand that instance.

Find and expand the Management section (assuming you have permission to see it).

Right-click SQL Server Logs, select View and then choose SQL Server Log.

How do I fix SQL Server errors?

To fix errors

Right-click the Product table (Product. SQL) in Solution Explorer and select View Designer. In the Columns Grid of the designer, right-click the ShelflLife column and select Delete to delete this column from the table


Hope this helps

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.