Setting Up Your Own Maintenance Tasks

The Maintenance Plan Wizard makes use of SQL Server jobs to perform its tasks. After the wizard creates these jobs, the jobs can be accessed and modified directly. This is a great way to cut and paste job functions from a Maintenance Plan job into a custom job you have created. Of course, you can create the jobs from scratch using the BACKUP, SQLMAINT and DBCC commands. However, the wizard is so easy to use that I find it easier to build an outline of my maintenance plan with the wizard, and then customize or copy the job steps into other jobs as required. Figure 17.12 shows an example of a backup job created by the wizard. Call me lazy, but I would rather cut, paste, and modify this statement than write it myself! See Chapter 18, "SQL Server Scheduling and Notification," for more details on creating your own custom jobs.

Figure 17.12. Viewing a job step created by the Maintenance Plan Wizard.


    Part III: SQL Server Administration
    Part IV: Transact-SQL
    Part V: SQL Server Internals and Performance Tuning
    Part VI: Additional SQL Server Features