Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Custom Maintenance Plans - the T-SQL way


Custom Maintenance Plans - the T-SQL way

Author
Message
Mark Marinovic
Mark Marinovic
SSC Veteran
SSC Veteran (223 reputation)SSC Veteran (223 reputation)SSC Veteran (223 reputation)SSC Veteran (223 reputation)SSC Veteran (223 reputation)SSC Veteran (223 reputation)SSC Veteran (223 reputation)SSC Veteran (223 reputation)

Group: General Forum Members
Points: 223 Visits: 355
Comments posted to this topic are about the item Custom Maintenance Plans - the T-SQL way
Cristi R
Cristi R
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 5
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
Jeyakumar-447522
Jeyakumar-447522
SSC Rookie
SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)

Group: General Forum Members
Points: 35 Visits: 178
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
Mark Marinovic
Mark Marinovic
SSC Veteran
SSC Veteran (223 reputation)SSC Veteran (223 reputation)SSC Veteran (223 reputation)SSC Veteran (223 reputation)SSC Veteran (223 reputation)SSC Veteran (223 reputation)SSC Veteran (223 reputation)SSC Veteran (223 reputation)

Group: General Forum Members
Points: 223 Visits: 355
***************

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
Attachments
Custom Maintenance Plans.zip (36 views, 27.00 KB)
Ralf Dietrich
Ralf Dietrich
Old Hand
Old Hand (391 reputation)Old Hand (391 reputation)Old Hand (391 reputation)Old Hand (391 reputation)Old Hand (391 reputation)Old Hand (391 reputation)Old Hand (391 reputation)Old Hand (391 reputation)

Group: General Forum Members
Points: 391 Visits: 87
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
Mark Marinovic
Mark Marinovic
SSC Veteran
SSC Veteran (223 reputation)SSC Veteran (223 reputation)SSC Veteran (223 reputation)SSC Veteran (223 reputation)SSC Veteran (223 reputation)SSC Veteran (223 reputation)SSC Veteran (223 reputation)SSC Veteran (223 reputation)

Group: General Forum Members
Points: 223 Visits: 355
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search