Forum Replies Created

Viewing post 1 (of 1 total)

  • Reply To: Send mail to a more than one email id in Sql server agent

    Yes, you can send email to multiple emails. See example T-SQL below to create a SQL Agent Operator with 3 email addresses:

    EXEC msdb.dbo.sp_add_operator @name=N'SQLAgentOperator',

    @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=127,

    @email_address=N'First.Operator.Email@email.com;SecondOperatorEmail@email.com;Third.OperatorEmail@email.com;',

    @category_name=N'[Uncategorized]'

    GO

    Note: the above code has been tested...

Viewing post 1 (of 1 total)