Tuesday, February 10, 2015

How to Find Operators with a Specific Email Address

This is one of those that I can never remember, for some reason. This is very handy in CMS, where you can search all your servers at once.

-- Find Operator for email address. 
  select distinct o.name     as 'Operator Name'
       , o.email_address     as 'Email Address'
    from msdb..sysoperators   o
   where @@servername not like 'BAD_SERVERS%'
     and o.email_address = 'MyEmailAddress@mydomain.com'
order by o.name
       , o.email_address

0 comments:

Post a Comment