Use the Design pane to create a workflow of database maintenance tasks. Tasks can execute independent of another task's status, or can be dependent on another task's completion before they can begin execution.
You can add additional subplans in a maintenance plan to group related tasks or to schedule tasks to execute at different times.
To create a maintenance plan
Drag tasks to the Design pane to add them to the subplan. Double-click a task to specify its properties.
Tip: If you need to create several similar plans, you can simply copy existing plans or subplans and then make the necessary edits. Copy Maintenance Plans
Tip: For legacy maintenance plans only:
Task | Add this task to... | Available for legacy plans |
---|---|---|
Fast Compression Backup |
Perform full or differential backups using the Fast Compression technology. NOTE: Fast Compression is only available with LiteSpeed 5.1 or later; Enterprise license. |
With LiteSpeed only |
Back Up Database |
Perform full, differential, or transaction log backups; with or without encryption. You can back up databases on multiple servers by adding a separate backup task to the maintenance plan for each server. |
Yes |
Check Database Integrity |
Validate the following:
|
Yes |
Reorganize Index |
Defragment and compact existing indexes to improve performance. | With LiteSpeed only |
Execute Job |
Execute an existing SQL Server Agent job. |
No |
Clean Up Maintenance Plans |
Remove obsolete backup files and reports created by a maintenance plan. |
With LiteSpeed only |
Clean Up History |
Remove historical data from the msdb database and LiteSpeed Local and Central repositories for the following:
|
With LiteSpeed only |
Notify Operator |
Send an email notification to one or more existing operators. You can use the notification profiles only if they are already configured within a SQL Server instance. TIP: Variables defined in the maintenance plan can be used to format the Subject Line. There is also help information inside the task that lists the available Subject Line variables. NOTE: The SQL Server Agent must be configured to send email using Database Mail. Review the following for additional information: |
With LiteSpeed only |
Rebuild Index |
Drop and recreate an index to improve performance. |
Yes |
Shrink Database |
Reduce the size of data and log files in a database that grow beyond a specified size. |
Yes |
Execute T-SQL |
Execute statements or batches on one or more databases. NOTE: SSIS maintenance plans support only the Transact-SQL command type. |
Yes |
Update Statistics |
Update column and index statistics. |
Yes |
(SSIS Plans only) Right-click a task to execute first and select Add Constraint to draw a line to the dependent task.
Tips:
NOTE: Constraints are not available for legacy plans. Legacy plan tasks are executed in the following sequence:
1. Clean Up History
2. Check Database Integrity
3. Rebuild Index
4. Shrink Database
5. Update Statistics
6. Reorganize Index
7. Fast Compression Backup or Back Up Database
8. Clean Up Maintenance Plans
9. Notify Operator
10. Execute T-SQL
(Optional) Set reporting options.
Reporting and Logging |
Click to set the reporting and logging options. Reporting and Logging in Maintenance Plans |
Notifications | Click to notify an operator of job (subplan) status when a job fails, succeeds, or completes. |
Tips:
NOTE: Backup options may vary depending on the LiteSpeed and SQL Server version and plan type (legacy or SSIS; native or LiteSpeed). About Automating Maintenance Tasks
Scenario You need to create a maintenance plan to only back up databases which names start with "C", "DB1" and "LiteSpeed", except "SoftwareCMSS". |
To configure database backups
Double-click the task and review the following for additional information:
Databases |
Click to select databases you want to include in and exclude from the maintenance plan. Scenario: Select the Databases matching regular expression option, enter the following in the Mask field: ^(?!SoftwareCMSS)(C|Quest Software|LiteSpeed) and click Add. Use Wildcard and Regular Expressions in LiteSpeed | |
Back up database across one or more files/destination |
This option creates one backup file for all selected databases. If you need to create striped backups, provide multiple backup destinations.
| |
Create backup file for every database |
Select this option, if you want to create separate disk backups for databases. | |
LiteSpeed file format |
The default backup file format uses the following information:
You can specify a custom backup file format using both the LiteSpeed variables and text. LiteSpeed Variables If you want LiteSpeed to remember a custom file format and use it for new backup tasks on this instance, modify the format in the LiteSpeed file format field as needed and click Set to Instance. NOTE: Fast Compression handles the naming of files automatically. For more information, see Backup Files and Folders. |
If you selected Cloud review the following:
Cloud vendor |
Select the cloud vendor, Amazon S3, Azure Blob or Google Storage, from the drop-down list, or use to choose an existing cloud account. You can also specify a custom cloud account directly in the task. |
Storage Account name |
Enter the name of your Azure blob storage account. |
Access key |
Enter the name of the unique Web service alphanumeric access key that identifies each user. |
Secret key |
Enter the name of the Web service secret key that was assigned when you initially setup your cloud account. |
Service account ID (Google Cloud Storage only) | Enter the name of your Google Cloud Storage Service Account ID. |
Private key (Google Cloud Storage only) | Enter the name of your Google Cloud Storage Private Key. |
Project ID (Google Cloud Storage only) | Enter the name of your Google Cloud Storage Project ID. |
Storage type |
Select the Azure storage type: block blobs or page blobs from the drop-down list. |
Container |
Select the Azure blob storage container from the drop-down list. |
Region |
Select a Web service region to use for a bucket with the drop-down list. |
Bucket |
Enter the name of the container for objects. Bucket names must be at least 3 and no more than 63 characters long. Alternately use the drop-down list to select an existing bucket. |
Folder name |
Enter the name of your Cloud folder. |
Overwrite existing fields |
Click to overwrite existing fields. |
Advanced options |
Click to specify cloud advanced options.
|
If you selected TSM Backup or TSM Archive,
Client node |
Enter the node name for the TSM session. This field is not case-sensitive. |
Client owner password |
Enter the access password for the specified node. |
Configuration file |
Select the configuration file. (Usually, dsm.opt.) NOTE: This file contains session options such as the TSM server's TCP address. If you select the Use PASSWORDACCESS GENERATE from TSM configuration file checkbox and your options file is configured to support this option, you do not need to specify the client node and client owner password. |
Management class |
Select the management class (policy) to associate with the backup object being created. LiteSpeed will use the default management class, if this option is not selected. |
TSM Filespaces (Fast Compression backups) |
This step is optional. You can click TSM Filespaces to select the existing or enter new file space name(s). NOTE: Fast Compression handles the naming of files automatically. For more information, see Backup Files and Folders. |
TSM Objects (Regular backups) |
Click TSM Objects and specify the filespace, the high-level name and the format of the low-level name. If the option Stripe on TSM object and the number of stripes are selected, the mask %@ is added by default to the end of the defined file format. If the option Stripe on TSM object and the number of stripes are selected, the mask %@ can be added by the user to any place of file format. |
Select the Options page.
If you selected the Backup Database task, review the following:
Backup set expires |
Select to set the transaction log expiration. The expiration can be set to expire after a selected amount of days or on a particular day. Select one of the following:
|
Remove files older than |
This option only removes files that match the file format from the specified destination folder.
TIP: To remove obsolete files from different locations, use the Clean Up task. Clean Up Maintenance Plans |
Verify backup when finished |
Select this option to verify that LiteSpeed successfully wrote all backup files and can read them. |
Set native backup compression |
Select one of the following options to manage whether to use SQL server native compression (available for native maintenance plans only):
|
Copy Only Backup |
Select this option to enable copy-only backups. |
Force a full backup if one has not been created | Select this option to run a force full backup if one has not been created. This is a useful option for differential and transaction log backups that require an initial full backup at first. |
If you selected the Fast Compression Backup task, review the following:
Fast Compression Backup Options |
You can set the following thresholds to define when to issue a full backup:
Fast Compression measures the amount of data change by either querying SQL Server or by comparing the size of the last differential to the last full backup. The default option is to query actual data pages. It provides the most accurate way to determine the amount of data change. If the query fails for any reason, Fast Compression will automatically run a size comparison to the last Differential backup. For example, set this parameter to 20%, and should the database change by 20% or more, Fast Compression will automatically run a Full backup. The larger the threshold, the larger the differential backups can grow before Fast Compression triggers the next Full backup. Regardless of how much underlying database data has changed, when exceeding the maximum interval (in days) between full backups, Fast Compression will force a full backup. NOTES:
Select the Extension for backup files checkbox to enter or change the backup file name extension. The default is set to bkp. NOTE: You can select the backup file extension for Fast Compression and make the new default, bak, for new items. For an existing item that does not have an extension defined, bkp is displayed when the item is edited (maintenance plans and templates). | |
Backup Escalation |
This option causes LiteSpeed to issue a full backup, if one of the following problems is discovered in the current backup set:
NOTE: If a problem is detected and a full backup is created through escalation, an error will be returned. | |
Verification and Cleanup |
TIP: "Cleanup" means SmartCleanup. For more information, refer to SmartCleanup. Make sure the backup files in the backup set have integrity. This provides an added level of insurance the backup files can be restored. Verification failures appear in the LiteSpeed UI Console and, optionally, as job failure notifications. A verification failure after a differential backup will trigger the backup escalation process, if selected. The Verification options include:
The Cleanup options include:
Specify the cleanup options. SmartCleanup NOTE: While transaction log backups can be automated within a separate Back Up Database task, you can configure cleanup of transaction log backups in the Fast Compression Backup task. | |
Notification |
Send an email notification to one or more existing operators. TIP: Variables defined in the maintenance plan can be used to format the Subject Line. There is also help information inside the task that lists the available Subject Line variables. NOTE: The SQL Server Agent must be configured to send email using Database Mail. Review the following for additional information: |
Select the LiteSpeed page. Review the following additional information about the encryption and compression options:
Adaptive Compression |
LiteSpeed automatically selects the optimal compression based on throughput and CPU usage and optimize backups either for size or for speed (default). NOTE: Adaptive Compression is only available with LiteSpeed 6.5 or later; Enterprise license. | |
Compression level |
Select 0 for no compression or 1-8 (default 2) to compress the file. For more information, see Compression Methods. NOTE: Higher compression levels result in smaller backup files, but they also take longer to complete.
| |
Encrypt backup |
Select this checkbox to encrypt the backup. Then, select the encryption level and enter the encryption password. |
Review the following additional information about the advanced options:
Compression threads |
Determines the number of threads used for the backup. You will achieve the best results by specifying multiple threads, but the exact value depends on several factors including: processors available, affinity setting, compression level, encryption settings, IO device speed, and SQL Server responsiveness. The default is n-1 threads, where n is the number of processors. |
Max transfer size |
Enter the maximum backup file size in bytes. . The possible values are multiples of 65536 bytes (64 KB) ranging up to 4,194,304 bytes (4 MB). The default is 1048576. |
Buffer count |
Enter the number of SQL Server buffers available for a LiteSpeed operation. The default is set by SQL Server. |
CPU throttle |
Enter the maximum percentage of CPU that LiteSpeed can use for the process. The default is 100. |
Processor affinity |
Click to select which processors LiteSpeed can use. The default is 0, which allows LiteSpeed to use all available system processors. |
Processor priority |
Select the priority of the backup over other transactions or processes running on the same server. The default is Normal. |
Comment |
User comment written into the backup header. Is blank by default. |
Logging level |
Select a logging level to define what events to log for the console. You can find the log events in the Application Event Log. |
Network resilience |
If LiteSpeed fails to write disk backups or reads from disk, it waits and retries the operation. You can enable and disable and control the number of times to retry and the amount of time to wait before retrying.
|
TIPS:
|
NOTE: LiteSpeed defaults typically result in the best performance. You should only modify advanced options after careful planning and testing. For more information, see Configure LiteSpeed Defaults.
Review the following additional information about the verification and recovery options:
Optimize the Object Level Recovery speed |
Select to create an index of objects in the backup file. This option is only available for LiteSpeed backups. The default is enabled. NOTE: Before you can recover objects or execute a SELECT statement, you must read the backup file to create an index of restorable objects. The index is an .lsm file. During the backup process the .lsm file is created in the temp directory and attached to the backup file after the backup is completed. If you select this option, LiteSpeed uses the index in the backup file to read the backup file, which makes the object level recovery process much faster. |
Create Double Click Restore executable |
Select to create a Double Click Restore Loader that allows you to restore a backup on a server instance that does not have LiteSpeed installed. If you select to Create one Double-Click Restore executable file then note the following warning. The executable may be greater than 4GB for large databases. Windows Server is unable to run executable files larger than 4GB. However, the file will be convertible/restorable by LiteSpeed file. For more information, see Double Click Restore Executables. NOTE: A Double Click Restore can only be created for a disk file. |
Perform checksum before writing to media |
Select to verify checksums when a backup is created. Additionally, you can control the response to an error. If you select the Continue on error option, the backup is executed despite encountering an invalid backup checksum. |
Continue on error |
Select this option to continue running the backup even if an invalid checksum is encountered. |
Select directories to mirror the backup to (Overwrite must be selected) |
Click Disk to backup to disk. Click Cloud to backup to cloud. |
Select files/folders to attach to the backup set |
Select Add to attach files or folders to the backup set. |
Use this task to remove obsolete backup files and maintenance plan reports.
To clean up maintenance plan data
Drag the Clean Up Maintenance Plans task to the Design pane.
Double-click the task and review the following for additional information:
Delete files of the following types |
Select the type of files to clean up:
|
Skip files in use by another process or access is denied | Select this option to skip files that are in use by another process or application and/or cannot be accessed. When this option is not selected locked files are forcibly deleted. |
Delete specific file | Select this option to delete a specific file. Enter the file name or select to browse for the file. |
Search folder and delete files based on extension | Select this option to remove any files with a specific file extension. Enter the folder name or select to browse for the folder. |
File extension | Enter the extension of the files you want to remove. |
Include all subfolders |
Select this option to include all subfolders when searching for files to remove.
|
Delete files based on the age of the file at task run time. Delete files older than the following: |
Select this option to automatically delete files based on their age in number of minutes, hours, days, weeks, months, and years. |
To set up similar plans, you do not necessarily have to start from scratch. Create a plan and copy it to any server instances where you want the plan to run.
NOTE: Copying and importing plans and subplans between servers may require additional manual steps, if the source and target servers have:
Different SQL Server versions—You may need to review and edit the selected databases list. Back Up Databases Using Maintenance Plans
Different LiteSpeed versions and different SQL Server versions—Back Up Databases Using Maintenance Plans
- LiteSpeed versions on the source and the target are different, but database lists are the same.
- LiteSpeed version is the same but the database list is different (warning indicates that some databases do not exist).
- LiteSpeed versions and database lists are different.
To copy a maintenance plan
To copy a subplan
To export or import a maintenance plan
To export or import a subplan
© ALL RIGHTS RESERVED. Nutzungsbedingungen Datenschutz Cookie Preference Center