• Evil Kraig F (6/21/2012)


    yb751 (6/21/2012)


    Sorry one more question if I may.

    What would be the best stategy for creating a new partition on the main table in such a way that I would not have to recreate the partition function and scheme every time I run the stored procedure?

    You can't, not easily. You could 'rotate' the partitions by using a contrived control value for them, but I don't recommend it as it defeats some of the optimization techniques used under the hood to help partitioning be seamless to the end user's speed.

    You nearly always end up programatically rebuilding the partition function and scheme.

    But we can give you a better answer, if you provide us with more details.