Brad’s Sure Guide to SQL Server Maintenance Plans- P50 docx

5 114 0
Brad’s Sure Guide to SQL Server Maintenance Plans- P50 docx

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

Thông tin tài liệu

Chapter 19: Create and Modify Maintenance Plans Using the Designer 246 you're ready to start using it. Add the Maintenance Plan Tasks At this point, we have three subplans, each with its own design surface. Our next task is to drag and drop the appropriate Maintenance Plan tasks to the design surface of the appropriate subplan. Let's consider each subplan in turn. Daily Full Backup Subplan According to the goals of our overall plan, this subplan should contain: • One Back Up Database task, to perform the full backup of AdventureWorks. • One Notify Operator task, to notify the operator, should the full backup fail. Highlight the Daily Full Backup subplan and then drag each of these two tasks from the Toolbox and drop them on the design surface, as shown in Figure 19.3. Chapter 19: Create and Modify Maintenance Plans Using the Designer 247 Figure 19.3: The Daily Full Backup subplan now has the necessary Maintenance Plan Tasks. Note, of course, that although we've now added the appropriate tasks, they are not yet configured. We will do this later, after adding the required tasks to the other two subplans. Hourly Log Backup Subplan According to our goals, this subplan should contain: • One Back Up Database task – to perform hourly backups of the transaction log for the AdventureWorks database. • One Notify Operator task – to notify the DBA, should the transaction log backup fail. Chapter 19: Create and Modify Maintenance Plans Using the Designer 248 The resulting design surface should look as shown in Figure 19.4. Figure 19.4: Notice that the Hourly Log Backup subplan now looks like the Daily Full Backup subplan. In their unconfigured states, the Daily Full Backup and the Hourly Log Backup subplans look identical. Later, when we configure them, we will specify one to do a full backup and one to do a transaction log backup. Weekly Maintenance Subplan Finally, we need to add Maintenance Plan tasks to our most complex subplan, the Weekly Maintenance subplan. Based on our database maintenance plan goals, we will need to add the Maintenance Plan Tasks below to the Weekly Maintenance subplan. Chapter 19: Create and Modify Maintenance Plans Using the Designer 249 • One Check Database Integrity task – to check the integrity of AdventureWorks. • One Rebuild Index task – to rebuild all of the indexes in AdventureWorks. • One History Cleanup task – to remove old backup, job, and maintenance plan history data from msdb. • Three Maintenance Cleanup tasks – each instance of this task can only delete one file type, so we need a total of three instances in order to delete older BAK, TRN, and report TXT files. • Seven Notify Operator tasks – one instance for each of the previous six Maintenance Plan tasks, to let the operator know if the task failed, plus an extra instance to let the operator know that the entire subplan succeeded. The resulting design surface would look similar to that shown in Figure 19.5. Chapter 19: Create and Modify Maintenance Plans Using the Designer 250 Figure 19.5: The Weekly Maintenance subplan is the most complex of the three. . specify one to do a full backup and one to do a transaction log backup. Weekly Maintenance Subplan Finally, we need to add Maintenance Plan tasks to our most complex subplan, the Weekly Maintenance. subplan. Based on our database maintenance plan goals, we will need to add the Maintenance Plan Tasks below to the Weekly Maintenance subplan. Chapter 19: Create and Modify Maintenance Plans Using. Seven Notify Operator tasks – one instance for each of the previous six Maintenance Plan tasks, to let the operator know if the task failed, plus an extra instance to let the operator know that

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

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

  • Đang cập nhật ...

Tài liệu liên quan