Custom Maintenance Plans - the T-SQL way

  • Comments posted to this topic are about the item Custom Maintenance Plans - the T-SQL way

  • Very very nice one Mark!

    It's very usefull if you have large number of db.

    How can we get the DB_Mail script?

    Thanks,

    C

  • Mark,

    Very useful and effective article. 🙂 Can you share the CustomMP_WithDBMail.sql file to my mail id which I mentioned below?

    jeykumar.net@gmail.com

    Regards,

    Jey

  • ***************

    For everyone's convenience, the SQL scripts and documentation is attached to this post.

    ***************

    Please let me know if you have any questions.

    Thank you!

    Mark

  • Hi Mark,

    why did you prefer custom maintenance plans over custom SQL scripts? (Yes it is a very interesting solution you showed up! - thx!)

    I've seen so many bugs in maintenance plans so I prefer not to use them. The most recent bug I've seen was, that it was correctly scheduled (at night) but was executed at a complete other time (mostly during business hours) 🙁

    I could not believe it - but I've it seen 1 month ago! With T-SQL scripts I had never such errors (for more than 10 years now)

    Ralf

  • Ralf Dietrich (6/21/2009)


    Hi Mark,

    why did you prefer custom maintenance plans over custom SQL scripts? (Yes it is a very interesting solution you showed up! - thx!)

    I've seen so many bugs in maintenance plans so I prefer not to use them. The most recent bug I've seen was, that it was correctly scheduled (at night) but was executed at a complete other time (mostly during business hours) 🙁

    I could not believe it - but I've it seen 1 month ago! With T-SQL scripts I had never such errors (for more than 10 years now)

    Ralf

    Ralf:

    Like you, I have seen many bugs/idiosyncrasies in Maintenance Plans over the years. To this point, I dealt with them.

    In this particular case, necessity being the mother of invention, I needed to perform all of the standard MP steps, but needed to do it for a certain, fluid subset of 3rd party databases over which I have no control.

    I used the exact SQL commands that the native plans use for consistency's sake. Of course, you can perform your steps hoever you like, but I wanted to create a good starting point.

    Hope that answers your question!

    MJM

Viewing 6 posts - 1 through 5 (of 5 total)

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