question

arslanawan avatar image
arslanawan asked

Email SQL Server And Agent Error Logs (email with details to why the job failed) .

Can it be possible?

I am trying to create a procedure where once it runs, it captures sql server and sql agent logs with error details (e.g I want the email to grab the details of why the backup job failed). Then the error should be send thru msdb.dbo.sp_send_dbmail. I know how to send a generic email where it says such as "Backup Failed, please see the error logs".

I would rather have the error itself sent in the email.

automation
10 |1200 characters needed characters left characters exceeded

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

0 Answers

· Write an Answer

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.