Policy Based Management Alerts Emails Operators

  • HI All

    Facing a bit of an issue with a server I have just set up policy based management on.

    I have created a condition and policy to check the last backup date of all databases and it evaluates as I would of intended.

    I have created an alert with error number 34052 for on On Schedule policy errors.

    The alert shows around 10 in the error count due to a number of times I have evaluated the policy to try and get the email to work.

    I have created the operator, set the email address, set it to email on the alert but the email wont fire.

    The SQL Agent alert system has the database mail profile set and is working ok.

    Executed sp_send_dbmail and sp_notify_operator using the mail profile and test parameters and the mails get sent.

    The policy checks 5 databases, 4 of them fail the policy 1 passes, the SQL error log shows errors 34052, the alert shows the number of times the error has occured, but the operator still shows never emailed.

    What am I missing?

    EDIT1:

    I have checked the SQL Agent log, and it is quoting the following 'An attempt was made to send an email when no email session has been established'

    I thought it was supposed to stop and start db_mail as and when it is required

    EDIT2:

    Think I may have answered this myself, I have not restarted the agent since I set the mail profile, as this is a production server with jobs running 24/7 this will have to wait until the next maintenance window. Will update on how it goes after a restart.

    Thanks

    Ant

  • Right click on SQLServer Agent --> Properties --> Alert system tab.. specify what are the options you set here.

    With the email option make sure you have added the operator

    -Satya SK Jayanty
    SQL Server MVP (Follow me @sqlmaster)
    Author of SQL Server 2008 R2 Administration CookBook
    SQL Server Knowledge Sharing network

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply