[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

MS SQL Server 2012 Maintenance Plan sequence

Posted on 2014-01-23
2
Medium Priority
?
683 Views
Last Modified: 2014-01-25
Hello from Italy,
we're running MS SQL Server 2012 under 2008 R2 for our ERP database

We have two Maintenance Plans:
- Backup ERP database plan (two times at day)
- Montly maintenance plan (first sunday of month)

This second plan runs the following tasks:
- Check Database Integrity
- Rebuild Index
- Update Statistics
- Clean Up History
- Shrink Database

Some questions:
1) Is there a task to be added or deleted?
2) This montly tasks sequence is correct or must be modified?
3) 'Reorganize Index' task is included in 'Rebuild Index' task or
    must be added to sequence?
4) Is correct to perform the above tasks for all databases (system
   databases included) or we must select only ERP database?

Thank you very much for your worldwide help!

Mauro
0
Comment
Question by:MauroMan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 750 total points
ID: 39802487
>- Shrink Database

this step should be removed. shrinking databases or database files should NOT be done regularly, it will just waste IO, and slow down the next operations on the database that require again some new space. usually, db are increasing and not decreasing. keep the free space (if any) . on the contrary, you should (best case) have the db files be increased before a INSERT actually requires more space and no free space would be available

for the rest, it depends ....
- cleanup history can be done "as by your actual needs", which can differ from db to db / server to server

- Check Database Integrity
   should be done weekly or even daily ... monthly is too longer interval

- Rebuild Index
  should NOT be done in a generic way for all indexes. better is to fetch some more dynamic script from internet, doing a rebuild for only indexes that are actually fragmented and not "small" indexes

- Update Statistics
  same as above, it may not be needed on all tables

of course, it is "simple/small" databases, it will work like you described.
for bigger (serious) databases, the standard maintenance plan is just "too simplistic"
0
 
LVL 43

Assisted Solution

by:Eugene Z
Eugene Z earned 750 total points
ID: 39802584
the answer is depends on your specifics \business requirements\ maintenances window\
DB size\ server  -sql server -DB setup configuration and much more


As the main idea: try to use T-SQL for these tasks as much as you can but it is not mandatory  :)

Shrink DB could be removed unless you have Drive space issues (you need to resolve space issues first and then remove shrink step)

--


We have two Maintenance Plans:
- Backup ERP database plan (two times at day)
2s per day? is it full backup? if it is a business requirement and not affecting performance - nothing you can do
But you must check if your DB in Full recovery Mode and if it is - you must to run regular (every 15 mins\30mins..) transaction log backup

- monthly maintenance plan (first Sunday of month)  -- this you must review

This second plan runs the following tasks:
- Check Database Integrity --- < EZ if DB is small and you have After hours window -try to  run nighty (it is online operation)

- Rebuild Index  ( same for this one - is it online or offline)
- Update Statistics  -- try to use not full but sample 10 for daily
- Clean Up History - daily
- Shrink Database  -- try to avoid
0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question