• cdm33.com (7/30/2014)


    SQLRNNR,

    This code has hundreds of lines to it. I've got no clue what it does. I'm not going to put something like this on a production server not knowing what it does.

    THanks anyway.

    That is an excellent answer.

    Jason is trustworthy and has probably pointed you at a good script, but I love your answer.

    You can use the Maintenance Plans and SQL Agent to automate this easily. Just be extremely cautious about the Maintenance Plans. It'll look like they do everything for you short of make coffee in the morning, but they can be problematic. However, focused use, like just having it do DBCC checks, should be perfectly fine.

    You'll find though, that over time, as you gain experience, the level of control with Maintenance Plans is too low. You'll eventually want to run scripts to get the job done.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning