SQL Server Performance

  • Home
  • Articles
  • Forums
  • Tips
  • Training
  • FAQ's
  • Blogs
  • Software
  • Books
  • About Us
RSS Feeds
Sign in | Join


Article Topics

All Articles
Performance Tuning
Audit
Business Intelligence
Clustering
Reporting Services
SQL Azure
Developer
General DBA
ASP.NET / ADO.NET
SQL Azure

USEFUL SITES :

ASP.NET Tutorials
Windows and SQL Azure Tutorials
Cloud Hosting Magazine
SharePoint Tutorials
Windows Server Help

Write for Us

Share your SQL Server knowledge with others and raise your profile in the community More...
Latest Articles

A High Level Comparison Between Oracle and SQL Server - Part ...
A High Level Comparison Between Oracle and SQL Server - Part ...
A High Level Comparison Between Oracle and SQL Server - Part ...
A High Level Comparison Between Oracle and SQL Server

More     
 
Latest FAQ's

Add Node to A SQL Server failover Cluster failed with invalid ...
SQL Server Destination remote server error
Setting Up Data And Log Files For SQL Server
Will Check Constraints Improve Database Performance?

More     
   
Latest Software Reviews

dbForge Review
Spotlight on ApexSQL Diff - Server-based database comparison tool ...
Spotlight on ApexSQL Data Diff - Server-based database comparison tool ...
Spotlight on ApexSQL Doc 2008

More     

articles >> general dba >> Overview of Maintenance Plans in SQL Server ...

Overview of Maintenance Plans in SQL Server 2008

By : Ashish Kumar Mehta
Nov 16, 2008

The Maintenance of a SQL Server databases is one of the primary responsibilities of a Database Administrator. To make database maintenance easier, DBA's can leverage the Maintenance Plan Wizard or Maintenance Plans which are available in SQL Server 2005 and higher versions. A DBA can create a database maintenance plan either by using the Maintenance Plan Wizard or by using the SQL Server Integration Services (SSIS) designer. By using the Maintenance Plan Wizard you can create a very basic maintenance plan for all the system and user databases. However, if you want to create an enhanced workflow then it is advised to create a maintenance plan using the SSIS designer. After reading this article you will understand in detail the different types of maintenance plan tasks that are available and their usage. We will also show how to create a basic SQL Server Maintenance Plan with some of the tasks available using the Maintenance Plan Wizard option.

Permissions Required to Create & Manage Maintenance Plans
You need to be a member of the sysadmin fixed server role to create and manage maintenance plans. Maintenance plans are only visible to those users who are member of the sysadmin fixed server role.

Different Types of Maintenance Plan Tasks
Let's look at the different types of Maintenance Plan tasks in SQL Server 2005 and SQL Server 2008 and their usage:

Back Up Database Task
The Back Up Database task allows you to perform different types of database backups like Full, Differential or Transactional Log backups based on the Recovery Model of the System or User databases. To know more about the different recovery models in SQL Server you can refer to my previous article titled “Database Recovery Models in SQL Server”. In the Maintenance Plan Wizard this task is subdivided into three individual tasks namely Back Up Database (Full), Back Up Database (Differential) & Back Up Database (Transaction Log). If you have chosen only a single database then it will even allow you to perform file and filegroup backups. Once the database backup has completed successfully within this task there is an option to verify the database backup integrity. In SQL Server 2008 Microsoft has introduced the Database Backup Compression feature and it is now possible to use the compressed database backups feature within the “Back up Database Task”. To know more about the database backup compression feature of SQL Server 2008 you can refer to my previous article titled “How to configure and Use Database Backup Compression in SQL Server 2008”

Check Database Integrity Task
The Check Database Integrity Task can be used to check the allocation and structural integrity of all the user and system tables within a database. This task also has an option to check the allocation and structural integrity of all the indexes available within a database. Using this task you can make a choice of database against which you want to perform the database integrity checks. This task internally executes the DBCC CHECKDB statement.

Execute SQL Server Agent Job Task
The Execute SQL Server Agent Job Task can be used to run a SQL Server Agent Job which is created on the SQL Server Instance. This task is only available when you are creating a Maintenance Plans using SSIS designer.

Execute T-SQL Statement Task
The Execute T-SQL Statement Task can be used to execute Transact SQL queries against a database. This task is only available when you are creating a Maintenance Plans using SSIS designer.

History Cleanup Task
The History Cleanup Task basically deletes the historical data related to database backups and restore activities, SQL Server Agent Job history, database maintenance plan history etc. This task basically uses the sp_delete_backuphistory system stored procedure to clean up the history prior to the number of days, weeks or months from the current system date.

Maintenance Cleanup Task
The Maintenance Cleanup Task can be used to remove the older files like maintenance plan execution reports, database backup files etc. You should use this task when you are creating maintenance plans as this will remove old files which are not required. 

Notify Operator Task
The Notify Operator Task can be used to send messages to the SQL Server Agent Operator when a task has successfully completed or failed. The operator can be notified by an email, pager or by net send method.

Reorganize Index Task
The Reorganize Index Task is used to defragments & compact both clustered and non-clustered indexes on tables and views. The index reorganize is best suited when the index are not heavily fragmented. This process takes very less system resources when compared to rebuilding an index. If the indexes are heavily fragmented then the best choice will be to rebuild indexes using the Rebuild Index Task.

Rebuild Index Task
The Rebuild Index task can be used to organize data which is there on the data and index pages by rebuilding indexes. This helps to improve the performance of index seeks and index scans. This task also optimizes the distribution of data and free space on the index pages, thereby allowing faster future growth. If this task is used to rebuild the indexes in a single database then it allows you to choose views and tables for which you want to rebuild the index. This task also has options such as “Sort results in tempdb” and “Keep index online while reindexing”. However these operations require sufficient disk space in tempdb database. 

Shrink Database Task
The Shrink Database Task can be used to reduce the disk space which is consumed by the database and log files by removing the empty data and log pages. Using this task the space gained after shrinking the database can either be returned to the operating system or it can be retained within the database for its future growth. This task basically executes DBCC SHRINKDATABASE statement.

Update Statistics Task
The Update Statistics task ensures that the query optimizer has up-to-date information about the distribution of data values within the tables. This allows the optimizer to make better judgments about the data access strategies it needs to choose. The Update Statistics task basically executes UPDATE STATISTICS statement.


    Next Page>>    








C# Help and Tutorials | PHP MySQL Tutorial | Sharepoint Tutorial | Azure Tutorial | Cloud Hosting Magazine | ASP.NET Tutorials | Windows Server Help | Windows Phone Pro | Silverlight Ace | Visual Studio Tutorials | Home | Peformance Articles | Audit Articles | Business Intelligence Articles | Clustering Articles | Developer Articles | Reporting Services Articles | DBA Articles | ASP.NET / ADO.NET Articles | SQL Server Training Videos | DBA FAQ's | Developer Peformance FAQ's | DBA Peformance FAQ's | Developer FAQ's | Clustering FAQ's | Error Messages | Audit Tool Reviews | Backup Tool Reviews | Coding Tool Reviews | Compare Tool Reviews | Documentation Tool Reviews | Design Tool Reviews | Monitoring Tool Reviews | Log Tool Reviews | Reporting Tool Reviews | Clustering Tool Reviews | Security Tool Reviews | Change Management Tool Reviews | Remote Access Tool Reviews | Book Reviews | Security Tool Reviews | ADO.NET / ASP.NET | Administration | Analysis/OLAP Services | Application Development | Configuration | Components | ETL | Hardware | High Availability | Hints | Index | Misc | Operating Systems | Performance Tuning | Replication | T-SQL | Views


              © 2010 Jude O'Kelly. All rights reserved