The settings of SQL Server 2005 are as follows:
1. Run SQL Server surface area configuration – > surface area configuration for features – > select Database Mail – > enable database mail stored procedures
2. Open SQL Management Studio > Management > Database Mail > configure SMTP settings
3. Open SQL Server Agent – > operators – > create a new operator
4. Create a new job – > in notifications, select email and the operator you just created – > send email when the job fails / succeeds / completes.
5. Finally, don’t forget to restart SQL agent
SQL Server 2008 is the same as 2005, but there is no first step.
I’m afraid that the above brief description is still difficult for beginners to operate. Take SQL Server 2008 as an example, and the figure shows.
1. Open SQL Management Studio > Management > Database Mail > configure SMTP settings
If the configuration is the first time, each of the following steps will appear. If the corresponding options have been configured before, the following steps will not all appear.
After the database email is configured, send a test mail to test whether the SMTP settings are correct
2. Open SQL Server Agent – > operators – > create a new operator
3. Create a new job – > in notifications, select email and the operator you just created – > select when the job fails / succeeds / completes
Since this section is not a special job tutorial, how to create a job will not be attached in this article. The figure of setting up an operator is attached below
Finally, don’t forget to restart the job agent
If you need to reprint, please indicate that this article was originally written from CSDN tjvctor column:http://blog.csdn.net/tjvictor