Brad’s Sure Guide to SQL Server Maintenance Plans- P15 ppsx

5 341 0
Brad’s Sure Guide to SQL Server Maintenance Plans- P15 ppsx

Đang tải... (xem toàn văn)

Thông tin tài liệu

Chapter 3: Getting Started with the Maintenance Plan Wizard 71 Figure 3.16: Since I am the only Operator, there are no other names to choose from. As you will see, you can only select a single operator. If you want to send Maintenance Plan reports to multiple users, you will need to have set up an operator that uses a group e-mail account, in which case each e-mail will be sent to every member of the group, each time the plan runs. Note also that, just because you receive an e-mail report after a Maintenance Plan executed, you shouldn't necessarily assume that the plan executed successfully. You'll need to delve into the details of the report to ensure that each task within the plan did, indeed, complete as expected. In Chapter 17, covering the Maintenance Plan Designer, we will discuss an alternative e-mail notification option that makes it easier to notify operators of problems with Maintenance Plans. Completing the Wizard After completing the Select Report Options screen, click Next, and the Complete the Wizard screen, shown in Figure 3.17, displays all the tasks you have configured, and also allows you to drill down to see what options you have set. I don't find this screen very useful, as I already know what I just did. Chapter 3: Getting Started with the Maintenance Plan Wizard 72 Figure 3.17: You can drill down into each of the tasks on this screen to see what settings you have configured. At this point, click on Finish to create the Maintenance Plan and reach the very last Maintenance Wizard screen, as shown in Figure 3.18. Chapter 3: Getting Started with the Maintenance Plan Wizard 73 Figure 3.18: Hopefully, you will see all successes. The Wizard creates the Maintenance Plan, and the Maintenance Plan Wizard Progress screen tells you if all the steps were successful. If you see all successes, you are done, and can now test your Maintenance Plan. If you encounter any errors or warnings, a message link will appear next to the problem. Given the large number of potential warnings or errors you could get, it is not possible to cover them here. However, in most cases, the message link will provide you with a clue as to what the problem is, and you will have to figure out how to go about fixing it. Having viewed this final screen, click on Close and we are done. Chapter 3: Getting Started with the Maintenance Plan Wizard 74 A Closer Look at Maintenance Plan Implementation So, when you create a Maintenance Plan, what happens from an architectural point of view within SQL Server? In other words, how is the plan physically implemented? Each Maintenance Plan is implemented as a single SQL Server Integration Services (SSIS) package. There will be one Maintenance Plan SSIS package for every Maintenance Plan you create. This package is executed using one or more scheduled SQL Server Agent jobs that are automatically created. We can view our new User Databases Maintenance Plan SSIS package by navigating to the relevant Maintenance Plans directory. To do this, open up SSIS from SSMS, navigate to the Stored Packages folder, then open up the MSDB folder, and finally, open up the Maintenance Plans folder, as shown in Figure 3.19. Connecting to SSIS To be able to view the SSIS packages, the SSIS service must be installed and running on your server, and then manually connect to the SSIS service from within SSMS. Figure 3.19: Viewing the new Maintenance Plan from within SSMS. While you can view the Maintenance Plan SSIS packages from here, you can't view their contents or modify them here. To do this, you must open them using the Maintenance Plan Designer, which we will cover in Chapters 16 to 19. While only one SSIS package is created per Maintenance Plan, one or more SQL Server Agent jobs will be created to run the package. If you selected Single schedule for the entire plan or no schedule then there will only be one SQL Server Agent job. However if, as advised, Chapter 3: Getting Started with the Maintenance Plan Wizard 75 you selected Separate schedules for each task, there will be a separate SQL Server Agent job created for each of the scheduled tasks in your Maintenance Plan. To view the jobs created when you create a new Maintenance Plan, use SSMS to open up SQL Server Agent on your SQL Server, and then open up the Jobs folder. Inside this folder, you will see every job on your SQL Server, whether it is a Maintenance Plan job or not, as shown in Figure 3.20. Figure 3.20: The name of your Maintenance Plan will be a part of the SQL Server Agent jobs. In Figure 3.20, you can see a lot of different jobs, but it is easy to spot the six Maintenance Plan jobs because they include the words "Maintenance Plan" as part of the job name. Each of these jobs will run one of the scheduled tasks that the Maintenance Plan will perform. Notice that each job has a sux of "Subplan" along with a number. The term, Subplan, is often used interchangeably with "job" and refers to a scheduled maintenance task; the number of the task matches the order of the tasks you assigned when you created the Maintenance Plan. However, don't forget that the logical ordering of the tasks that you specified is not necessarily the order in which they will be executed. This order is decided by your schedule for each task, as we discussed earlier. . Maintenance Plan, use SSMS to open up SQL Server Agent on your SQL Server, and then open up the Jobs folder. Inside this folder, you will see every job on your SQL Server, whether it is a Maintenance. scheduled SQL Server Agent jobs that are automatically created. We can view our new User Databases Maintenance Plan SSIS package by navigating to the relevant Maintenance Plans directory. To do. SSMS, navigate to the Stored Packages folder, then open up the MSDB folder, and finally, open up the Maintenance Plans folder, as shown in Figure 3.19. Connecting to SSIS To be able to view the

Ngày đăng: 04/07/2014, 23:20

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan