Solved

MS SQL Server 2012 Maintenance Plan sequence

Posted on 2014-01-23
2
645 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 250 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 42

Assisted Solution

by:Eugene Z
Eugene Z earned 250 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
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 ?
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

735 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