- Newest
- Most votes
- Most comments
I use the send_dbmail stored procedure to at least send agent job failure notifications.
I will create the agent job and then add a step named Failure Notification with the specifics for the dbmail properties needed.
Then change the advanced setting for the job , so if the job fails it will go to the Failure Notification step and send the email.
Here is an example of what I use. You can of course customize it to fit your needs.
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'ProfileName',
@recipients = 'emailAddress',
@importance = 'High',
@sensitivity = 'Confidential',
@body = 'The following job has failed: xxJobNamexxx. To check further please login to the EC2.',
@subject = 'The SQL Job Failure on RDS_nstanceName';
Hello,
Warm Greetings.
I understand that RDS for SQL Server supports SQL Server Agent jobs but lacks support for operators/notifications. The suggested workaround by AWS is exporting the instance error log to CloudWatch and creating a log group metric filter + alarm + SNS topic/subscription, which is cumbersome and lacks job name/details. Hence, you would like to get this feature added to RDS service.
To begin with, please note that as mentioned by the AWS team currently this feature is not available in RDS service. Which is clearly mentioned with statements “Email notifications through SQL Server Agent aren't available from a DB instance. SQL Server Agent alerts and operators aren't supported” in the below documentation.
[+] Using SQL Server Agent - https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.SQLServer.CommonDBATasks.Agent.html
Please look into below documentation for the possible workaround which might be suitable for your use case.
[+] https://repost.aws/knowledge-center/rds-sql-server-sns-notification-events
Relevant content
- asked 3 years ago
- asked 4 months ago
- asked a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago