Create Operator From Script

No Pager schedule.

USE [msdb]
GO

EXEC msdb.dbo.sp_add_operator @name=N'DBA', 
		@enabled=1, 
		@weekday_pager_start_time=90000, 
		@weekday_pager_end_time=180000, 
		@saturday_pager_start_time=90000, 
		@saturday_pager_end_time=180000, 
		@sunday_pager_start_time=90000, 
		@sunday_pager_end_time=180000, 
		@pager_days=0, 
		@email_address=N'me@test.com', 
		@category_name=N'[Uncategorized]'
GO

Multiple Email Addresses:

Add multiple email addresses separate by semi colon “;”

E-mail name: address01@test.com;address02@test.com

  1. You could create a new operator with the semi colon delimited list of email addresses. Looking at the definition of sysoperators this is good for strings that can fit in nvarchar(100)
  2. If you need to exceed that you could probably set up an email distribution group.

Last modified: July 24, 2020

Author

Comments

Write a Reply or Comment