Anchor | ||||
---|---|---|---|---|
|
Table of Contents |
---|
...
MSSQL Server Maintenance Plan
When and How to do server maintenance
Greenstone recommends that customers backup their MSSQL databases on a regularly scheduled basis. The SQL Server Maintenance Plan found inside SQL Server Management Studio allows the customer to configure their own Maintenance Plan to meet their business requirements.
The content below provides a recommendation for performing regularly scheduled backups. This recommendation should not be considered a requirement. This template should be modify based on business requirements and used as a guideline to assist your I.T. team in deploying a plan that meets your company's needs. The details of a SQL Server Maintenance Plan may vary from customer to customer. There are many unique situations that should be considered when creating a SQL Server Maintenance Plan. If your business has a Database Administrator, it is best to discuss Database Backup schedules and Recovery capabilities to ensure all relevant data is backed up on a regular basis and can be recovered in a timely manner if necessary.
Maintenance Plans allow the administrator to create backups, perform database integrity checks, database statistics updates and other tasks. These tasks are part of a Subplan which can be scheduled to run at specified time intervals.
Best Practices
http://sqlmag.com/database-backup-and-recovery/sql-server-backup-best-practices
Perform Full Backups Daily
Perform Frequent Transaction Log Backups
Regularly Back Up System Databases
Back Up the Host OS Daily
Practice Recovery Operations – It is important to perform an actual Database Recovery operation to verify the backup and restore processes are working properly.
There are 2 methods for creating a Maintenance Plan via Microsoft SQL Server Management Studio -> Management
...
*Note: if there is a database failure you will need to restore the Database and the associated Transaction Logs. The database backup will contain all the data from your last full backup and the Transaction logs will contain all the transactions that occurred since your last backup. These 2 entities are required for a full recovery.
Creating a Daily Maintenance Plan
The screenshots and content below are provided as a guide for creating a Daily Maintenance Plan. These steps are not all inclusive. Steps can be added or removed based on the business need.
Creating a Daily Maintenance Plan
Right click on Maintenance Plans and choose Create New Plan
Enter the name of the plan in the Name field
[optional] enter a description
- Add tasks to Subplan_1 (also you can rename Subplan_1 to something more meaningful)
Click on the line of Subplan_1
Click on the toolbox(to the left of the Object Explorer) and drag desired tasks to the Designer Area as illustrated below
Configure the Back Up Database task in the Subplan – right-click on the Back Up Database task and Edit
- Select the databases to be backed up. Accelerator and AGRIS databases should be selected. If there are multiple Accelerator and AGRIS databases, these can be selected as well.
Configure the Rebuild Index Task – right-click on the Rebuild Index Task and Edit
Select the AGRIS and Accelerator databases
Configure the Update Statistics Task – right-click on the Update Statistics Task and Edit
Choose AGRIS and Accelerator databases
Configure the Check Database Integrity Task – right-click on Check Database Integrity and Edit
Create a Subplan for backing up the Transaction Log
Click the Add Subplan button to create a new subplan
Drag the Back Up Database Task onto the Design area as indicated below
Configure the Back Up Database Task for the Transaction Log – right-click on Back Up Database Task and Edit and choose the AGRIS and Accelerator databases
Configuring scheduled jobs to run on recurring intervals
When the subplans above were created, a Job was automatically created that can be scheduled to run automatically
Double click on Each Job to Edit the Schedule
Configure the Transaction Log back subplan_2
Complete the Maintenance plan
At this point the Maintenance plan is complete and the backups are scheduled to run automatically
The Job Activity Monitor can be used to monitor the status of each job
The Plan History can be viewed by right clicking on the Plan and choosing View History