MaintenancePlan order

  • Guys,

    Can some one help me in what order I need to set up wizard for integrity and optimization jobs in my dev enviroment.

    Thank you

  • The order can be according to your convenience. There is no hard and fast rule as to which of these should be running first.

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • Thank you,but can you please help me with those

    Check Database Integrity (should I include indexes?)

    Shrink Database(do I need to do it?, if yes I have limit 50 mb and limit 10%,is that correct?)

    Reorganize Index(should I include compact large object?)

    Rebuild Index (not sure what I should include there)

    Update Statistics

    Maintenance Cleanup task

  • Check Database Integrity (should I include indexes?)

    Please include indexes

    Shrink Database(do I need to do it?, if yes I have limit 50 mb and limit 10%,is that correct?)

    A BIG no no. Never shrink database as it results in fragmentation and defeats the very purpose of reindexing.

    Reorganize Index(should I include compact large object?)

    Not needed if you are rebuilding the index

    Rebuild Index (not sure what I should include there)

    Please reindex and if you are not sure you may use the default values.

    Update Statistics

    Please do this after reindexing the database.

    Maintenance Cleanup task

    This cleans up the files related to Maintenance Plans like text reports etc. Use based on your requirements.

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • Thank you so much. So for re build index I am using:Reorganize pages with default amount of free space (I am not selecting anything else right?) and for all of my options which:

    Check Database Integrity

    Reorganize Index

    Rebuild Index

    All my databases and all system right?

    Thank you again

  • No problem. Yes please go ahead with it

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • for the system temp needs to be included too?

  • Please do it for the system databases except tempdb !

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • I usually set up system database separate from user databases, especially since system databases don't need transaction log backups.

    Otherwise, the advice above looks good.

  • No point trying to rebuild indexes or update stats on master or model. They have few-to-no user tables. Integrity checks they need, but not index rebuilds.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thank you everyone for your help, I just ran it and got error message:

    Unable to start execution of step 1 (reason: line(1): Syntax error). The step failed.

    Any idea why?

  • Please post the Screen shot or the script of the job you are trying to execute. Also let us know while executing which task you get this error.

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • Are you running the job or plan? Do you have a log file setup in the plan?

  • I am running maintanse plan

  • no I don't have log file set up for plan

Viewing 15 posts - 1 through 15 (of 21 total)

You must be logged in to reply to this topic. Login to reply