locked
Send mail using operator RRS feed

  • Question

  • Database Mail profile is not enabled in sql server( Due to security purpose) but operator is created and I want to send Monitoring mail from query using that operator.

    Kindly help for it.


    Thanks

    Monday, May 12, 2014 5:32 AM

Answers

  • If you can NOT enable Database mail then use Job Mail Notifications so SQL Server Agent will notify when the database is being monitored (when the job fails, completes and so on) to the operator you choose or you have.

    Therefore you need to enable SQL SERVER AGENT to be able to utilize Database Mail since Agent has the capability to send email notifications but we don’t have to forget that this triggered by alerts or scheduled task completions, such as jobs so if you want to send email regarding the job monitor to your operator So this is the steps you have to follow you right-click the SQL Server Agent node and then select Properties. On the left side of the Properties dialog that appears, you click the Alert System link. Under the Mail Session group, you check the Enable Mail Profile check box. In the Mail System drop-down list, you select Database Mail this is also the where you can select SQL Mail, if you want to).

    In the Mail Profile drop-down list, you select the default SQL 2008 profile you created earlier and then click OK. By doing this, you are telling SQL Server Agent to use the SMTP servers in your default profile to send email. You need to restart SQL Server Agent by using the right-click menu.

    I hope this will help in solving your problem in more or less, good luck.


    • Edited by Abubeker Refaw Monday, May 12, 2014 6:12 AM
    • Proposed as answer by Sofiya Li Tuesday, May 13, 2014 7:26 AM
    • Marked as answer by Sofiya Li Tuesday, May 20, 2014 2:12 AM
    Monday, May 12, 2014 6:10 AM

All replies

  • If you can NOT enable Database mail then use Job Mail Notifications so SQL Server Agent will notify when the database is being monitored (when the job fails, completes and so on) to the operator you choose or you have.

    Therefore you need to enable SQL SERVER AGENT to be able to utilize Database Mail since Agent has the capability to send email notifications but we don’t have to forget that this triggered by alerts or scheduled task completions, such as jobs so if you want to send email regarding the job monitor to your operator So this is the steps you have to follow you right-click the SQL Server Agent node and then select Properties. On the left side of the Properties dialog that appears, you click the Alert System link. Under the Mail Session group, you check the Enable Mail Profile check box. In the Mail System drop-down list, you select Database Mail this is also the where you can select SQL Mail, if you want to).

    In the Mail Profile drop-down list, you select the default SQL 2008 profile you created earlier and then click OK. By doing this, you are telling SQL Server Agent to use the SMTP servers in your default profile to send email. You need to restart SQL Server Agent by using the right-click menu.

    I hope this will help in solving your problem in more or less, good luck.


    • Edited by Abubeker Refaw Monday, May 12, 2014 6:12 AM
    • Proposed as answer by Sofiya Li Tuesday, May 13, 2014 7:26 AM
    • Marked as answer by Sofiya Li Tuesday, May 20, 2014 2:12 AM
    Monday, May 12, 2014 6:10 AM
  • The Agent email functionality uses Database Mail, So if you want Agent to send email you need to configure Db Mail, quite simply.

    Tibor Karaszi, SQL Server MVP | web | blog

    • Proposed as answer by Sofiya Li Tuesday, May 13, 2014 7:26 AM
    Monday, May 12, 2014 2:49 PM