Solved

MS SQL Server 2012 Maintenance Plan sequence

Posted on 2014-01-23
2
650 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 43

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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
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…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

737 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