Graphic tutorial for sending email notification when SQL Server Job runs successfully or fails

Source: Internet
Author: User
Tags sql management studio

The SQL Server 2005 settings are as follows:
1. run SQL Server Surface Area Configuration-> Surface Area Configuration for features-> select Database Mail-> select Enable Database mail stored procedures
2. Choose SQL Management Studio> Management> Database mail> Configure SMTP Settings.
3. enable SQL Server Agent> Operators> to create a new Operator.
4. Create a new Job-> in Notifications, select Email and the newly created Operator-> select to send an Email when the Job fails, succeeds, or completes.
5. Finally, do not forget to restart the SQL Agent.

The setting of SQL Server 2008 is the same as that of SQL Server 2005, but there is no first step.

The above brief description is difficult for beginners. The following uses SQL Server 2008 as an example.
1. Choose SQL Management Studio> Management> Database mail> Configure SMTP Settings.
If this is the first configuration, each of the following steps will appear. If the corresponding options have been configured before, the following steps will not all appear.

After configuring the Database Email, send a test mail to test whether the SMTP settings are correct.

2. Choose SQL Server Agent> Operators> Create a new Operator.

3. Create a new Job-> in Notifications, select Email and the newly created Operator-> when the Job fails, succeeds, or completes
Since this section is not a tutorial on specialized jobs, how to create a Job is not shown in this document. The following figure shows how to set Operator.

Never forget to restart the Job Agent.

 
If you need to reprint, please indicate the original from CSDN TJVictor column: http://blog.csdn.net/tjvictor

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.