SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Automate Sliding Window Partition Maintenance: Part III


Automate Sliding Window Partition Maintenance: Part III

Author
Message
Hugh Scott
Hugh Scott
Mr or Mrs. 500
Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)

Group: General Forum Members
Points: 580 Visits: 190
Comments posted to this topic are about the item Automate Sliding Window Partition Maintenance: Part III



Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (217K reputation)SSC Guru (217K reputation)SSC Guru (217K reputation)SSC Guru (217K reputation)SSC Guru (217K reputation)SSC Guru (217K reputation)SSC Guru (217K reputation)SSC Guru (217K reputation)

Group: General Forum Members
Points: 217024 Visits: 41991
I wouldn't have used PoSH for any of this but this is a nice series you've put together. Thanks for taking the time.

Shifting gears a bit, the title of this article is "Automate Sliding Window Partitions". You mentioned that you ran the scripts manually for a couple of months but (unless I missed it), you never mentioned how you scheduled these to run automatically each month. What did you use to put it all together on a scheduled basis? Or, is there an up and coming Part IV to this series that will explain how to do that?

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Hugh Scott
Hugh Scott
Mr or Mrs. 500
Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)

Group: General Forum Members
Points: 580 Visits: 190
It's been a few years, but I seem to recall that I used PoSH because I had trouble getting T-SQL to handle some of the filesystem checks (eg, check for default data file location, check for space). If that sounds vague, it is...I really don't remember.

Ultimately, I did automate the tasks via SQL Agent scheduled task. We would run the script about 3-5 days before the end of the month. That way if it did fail, I'd have a day or two to fix things up before month end rolled around and data would start loading. In the end, we never had an issue with the script failing in production. We only had an issue in non-production (as I recall, the issue would only arise if we refreshed the non-production database after production had run the merge/switch routine).

We recently turned off this solution because we stopped using the database (because we switched to a new product with a new [non-existent] BI solution). The business is only now beginning to realize how much they have lost due to the switch. But that's a story for a different day...

Regards,

Hugh Scott



Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (217K reputation)SSC Guru (217K reputation)SSC Guru (217K reputation)SSC Guru (217K reputation)SSC Guru (217K reputation)SSC Guru (217K reputation)SSC Guru (217K reputation)SSC Guru (217K reputation)

Group: General Forum Members
Points: 217024 Visits: 41991
Thanks, Hugh. I appreciate the feedback.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
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