Tham khảo tài liệu 'mastering sql server 2000- p14', công nghệ thông tin, cơ sở dữ liệu phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 670 I CHAPTER 17 AUTOMATING ADMINISTRATION FIGURE You can change any of the aspects of your plan by bringing up its properties in Enterprise Manager. To view the history of the plan right-click it and select Maintenance Plan History. This will display everything the plan has accomplished recently. USING THE DATABASE MAINTENANCE PLAN WIZARD I 671 As you can see maintenance plans are very helpful in keeping your database running smoothly and efficiently. Now you don t have to worry about staying late to run maintenance jobs or which task should be completed first. The plan does it all for you. However there are even more automation features that you can take advantage of for instance SQL Mail can e-mail you the results of a query. Let s see how that works. Working with SQL Mail Earlier in this chapter you learned that by configuring a mail profile and creating an alert you can have SQL Server mail you when an error occurs on your server. However there will be cases when you need to see more than just an error message. For example if there is a query that you run on a regular basis it may be helpful to create a job that can run the query and e-mail you the result set. You may want to send SQL Server an ad hoc query but you don t have the tools on the machine on which you are working currently so you need to e-mail the query to SQL Server. All of these things can be accomplished with SQL Mail. SQL Mail turns the MSSQLServer service into a MAPI Messaging Application Programming Interface client that is capable of receiving and sending e-mail. This client can receive queries via e-mail process those queries and return the result set back to the sender of the message. SQL Mail also enables you to send e-mail from a stored procedure. To make this work you need to follow the steps from an early section of this chapter under Configuring Mail Support. Once that is done follow the steps below 1. Open Enterprise Manager by selecting it from the SQL Server 2000 group under