내용으로 건너뛰기

Add support for Agent Operators and email notifications in RDS for SQL Server.

0

RDS for SQL Server currently supports SQL Server Agent jobs but not operators/notifications.

The current suggested workaround by AWS is to export the instance error log to CloudWatch and to create a log group metric filter + alarm + SNS topic/subscription which is cumbersome and also does not include the job name/details.

I wish AWS would add support to those basic features we had since SQL Server 2000 so we could easily define and enjoy them.

2개 답변
0

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';	
답변함 일 년 전
-1

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

AWS
지원 엔지니어
답변함 2년 전
전문가
검토됨 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.