posted 12/10/2009 by MikeMollenhour - Views: [1997]
Today I was working with creating a rolling date based partition scheme. In this scheme I wanted to switch out the earliest date range so I could switch in the new. To do this you need to create a staging table. My question was how do I create this in such a way that if I make changes to the table this code will not need maintenance? First thought was to do a select into unfortunately the select into does not support direction to a fileGroup which with switching out the data this staging table has to be in the same filegroup. Luckily I did a few searches and found this managepartition.exe. It is simple to use and has great documentation. It will create your staging table automatically in the same file group and switch the partition out for you. A very good find.
http://sqlpartitionmgmt.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=23683