Lesson 2: Creating a Maintenance Plan in Visual Studio .NET

Printing PDF 417 in Visual Studio .NET Lesson 2: Creating a Maintenance Plan

Lesson 2: Creating a Maintenance Plan
PDF417 Creation In .NET Framework
Using Barcode maker for .NET framework Control to generate, create PDF417 image in Visual Studio .NET applications.
www.OnBarcode.com
Decoding PDF-417 2d Barcode In .NET Framework
Using Barcode decoder for .NET Control to read, scan read, scan image in .NET applications.
www.OnBarcode.com
Figure 14-13 Specifying backup options
Bar Code Encoder In VS .NET
Using Barcode generation for Visual Studio .NET Control to generate, create barcode image in .NET applications.
www.OnBarcode.com
Decode Barcode In Visual Studio .NET
Using Barcode reader for VS .NET Control to read, scan read, scan image in VS .NET applications.
www.OnBarcode.com
Figure 14-14 Defining one schedule for the entire maintenance plan
PDF417 Printer In Visual C#
Using Barcode printer for VS .NET Control to generate, create PDF 417 image in Visual Studio .NET applications.
www.OnBarcode.com
PDF417 Drawer In VS .NET
Using Barcode generation for ASP.NET Control to generate, create PDF417 image in ASP.NET applications.
www.OnBarcode.com
14
PDF 417 Generation In Visual Basic .NET
Using Barcode creator for VS .NET Control to generate, create PDF-417 2d barcode image in VS .NET applications.
www.OnBarcode.com
Encode Bar Code In VS .NET
Using Barcode creation for .NET framework Control to generate, create barcode image in Visual Studio .NET applications.
www.OnBarcode.com
Working with SQL Server Agent Jobs
Make Code 3/9 In VS .NET
Using Barcode generator for VS .NET Control to generate, create Code-39 image in .NET applications.
www.OnBarcode.com
Bar Code Generation In .NET
Using Barcode drawer for .NET Control to generate, create bar code image in .NET framework applications.
www.OnBarcode.com
The scheduling options available are the same as when you are scheduling a SQL Server Agent job (see Figure 14-15). The difference is that for a regular SQL Server Agent job, you can define multiple schedules for a regular job and reuse previously created job schedules, but you can define only one schedule for a maintenance plan.
Denso QR Bar Code Creation In .NET
Using Barcode generator for VS .NET Control to generate, create QR Code image in VS .NET applications.
www.OnBarcode.com
International Standard Book Number Creator In VS .NET
Using Barcode creator for .NET Control to generate, create ISBN - 13 image in VS .NET applications.
www.OnBarcode.com
Figure 14-15 Specifying scheduling options
Create PDF-417 2d Barcode In None
Using Barcode creation for Software Control to generate, create PDF417 image in Software applications.
www.OnBarcode.com
ECC200 Creator In .NET Framework
Using Barcode creation for Reporting Service Control to generate, create ECC200 image in Reporting Service applications.
www.OnBarcode.com
Click OK to close the New Job Schedule dialog box. After defining the schedule, you see a summary of the scheduling options displayed within the Maintenance Plan Wizard, as Figure 14-16 shows. Click Next. For reporting purposes, you can configure each maintenance plan to write an output file or to e-mail the report about the actions it performs, as shown in Figure 14-17. You will usually specify writing to an output file that you can scan for errors. Click Next.
QR Code ISO/IEC18004 Creation In None
Using Barcode printer for Microsoft Word Control to generate, create QR Code ISO/IEC18004 image in Office Word applications.
www.OnBarcode.com
Print Barcode In None
Using Barcode creation for Microsoft Excel Control to generate, create barcode image in Office Excel applications.
www.OnBarcode.com
Lesson 2: Creating a Maintenance Plan
QR Code Drawer In VB.NET
Using Barcode drawer for Visual Studio .NET Control to generate, create QR Code JIS X 0510 image in VS .NET applications.
www.OnBarcode.com
Encoding Linear 1D Barcode In C#.NET
Using Barcode maker for .NET Control to generate, create Linear 1D Barcode image in .NET framework applications.
www.OnBarcode.com
Figure 14-16 Single schedule definition for the maintenance plan
Drawing EAN-13 In Java
Using Barcode creation for Android Control to generate, create EAN / UCC - 13 image in Android applications.
www.OnBarcode.com
Code-39 Generation In None
Using Barcode printer for Office Excel Control to generate, create Code39 image in Microsoft Excel applications.
www.OnBarcode.com
Figure 14-17 Specifying reporting options
At this point, you have completed the creation of a maintenance plan, and the wizard asks you to verify your choices, as Figure 14-18 shows. When you click Finish, the wizard performs the following steps: 1. Generates an SSIS package. 2. Stores that SSIS package within the msdb database.
14
Working with SQL Server Agent Jobs
3. Creates a job in SQL Server Agent to execute the maintenance plan. 4. Creates entries in the sys.dbmaintplan* tables within the msdb database.
Figure 14-18 Finishing maintenance plan creation
Quick Check
1. What operations can a maintenance plan perform 2. How many schedules can you apply to a maintenance plan
Quick Check Answers
1. A maintenance plan can back up databases, delete old backup files from the operating system, maintain indexes, execute another job, and shrink a database. 2. You can apply only one schedule to a maintenance plan.
PRACTICE
Create a Maintenance Job
In this exercise, you will practice the creation of a maintenance plan to back up the AdventureWorks database. Instead of using the Maintenance Plan Wizard to create the maintenance plan, you will define it from a generic maintenance plan. 1. In SSMS, right-click the Maintenance Plans node in Object Explorer and choose New Maintenance Plan.
Lesson 2: Creating a Maintenance Plan
2. Specify a name for the maintenance plan and click OK. 3. Click the browser button ( ) to the right of the Schedule text box. 4. Configure the maintenance plan to run once per day at 23:00, or 11:00 PM. When you re done, click OK to close the Job Schedule Properties dialog box. 5. Click Connections to open the Manage Connections dialog box. Click Add and specify the server connection options. Click OK to save your changes and then click OK again to close the Manage Connections dialog box. 6. Click Logging and configure the logging options you want to use for this plan. 7. In the Maintenance Plan Tasks toolbox, drag and drop the Back Up Database Task onto the surface of the maintenance plan. 8. Double-click the Back Up Database Task and specify the AdventureWorks database to perform a full backup. Click OK to close the Back Up Database Task dialog box. 9. Drag and drop a Maintenance Cleanup Task onto the surface of the maintenance plan. 10. Select the Back Up Database Task. 11. Drag the green arrow from the Back Up Database Task to the Maintenance Cleanup Task, which creates a dependency between the two tasks so that the backup task runs first and the cleanup task runs second. 12. Double-click the Maintenance Cleanup Task and specify saving the backups for one day. When you re done, click OK to close the Maintenance Cleanup Task dialog box. 13. Click Save on the toolbar to save your maintenance plan.
Lesson Summary
A maintenance plan enables you to graphically configure SQL Server to perform one or more predefined maintenance tasks on a scheduled basis against one or more databases. The most common type of maintenance plan that you will create is to back up a database on a regular basis. Each maintenance plan is a monolithic SSIS package that can have only one schedule defined for it.
Copyright © OnBarcode.com . All rights reserved.