Database Mail

  • Hi,

    I have configured the database mail option.

    I have create a profile and an account.

    Hi have tested , through the option "Send Test E-mail" and it works fine.

    Now i want to trigger a mail to me when full backup is taken for perticuler database

    the daily backup is define in the maintenance plan.

    waiting for reply...

    Thanks

    Dhirju

  • what version of SQL is this?

  • SQL 2008 with windows server 2008 R2

  • First you need to create an Operator(The Operators option can be found when U drop down the Sql Server Agent menu).

    When a Maintenance plan is created a Job will also be created automatically in the name of Maintenance plan.

    Double click on the job

    Then click the notification option.

    Select the Email box , then select the operator & also select the option "When the job succeeds".

    You should be able to receive a mail once backup completes.

  • i do it as u say. but it is not working 🙁

  • Have you checked the error logs? What does it say?

  • you need to enable mail profile for SQL Agent, by going to SQL Agent properties as listed in the link below. This is how the SQL server agent mail can use database mail. Note - this needs SQL Agent restart.

    http://msdn.microsoft.com/en-us/library/ms186358.aspx

  • the other thing that could be blocking is antivirus. You have to go to the anti-virus console, find something like 'prevent mass mailing worms from sending mail', and add exclusion for SQL. For SQL 2008 and 2008 R2 it is - DatabaseMail.exe

    This would prevent SQL emailing (a notification) from being blocked.

    Funnily, I know some servers running without SQL Agent mail not being enabled. (So, I am curious myself if emails can be sent without this setting. I will check and get back on this sometime later)

  • error msg :

    [264] An attempt was made to send an email when no email session has been established

  • i am bit confused why only testing mail went well if properties/settings are not good enough.

    anyways try below

    To set up SQL Server Agent Mail to use Database Mail

    In Object Explorer, expand a server.

    Right-click SQL Server Agent, and then click Properties.

    Click Alert System.

    Select Enable Mail Profile.

    In the Mail system list, select Database Mail.

    In the Mail profile list, select a mail profile for Database Mail.

    Restart SQL Server Agent.

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • thanks . it is woking now .

    i restart agent services.

    Thanks

    Dhirju 😀

  • I mentioned it needs a restart of SQL services..:Whistling: Good to know its working now :-). Did you also have to put in exclusions for antivirus settings?

Viewing 12 posts - 1 through 11 (of 11 total)

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