Delete Partitions

  • Hi all,

    I create every month automatically partitions for tables, i have a question is it possible to delete the partitions physically from the disc which that partition is empty, but if I delete I'll damage the database structure.

    Thnx to all

  • If the partition is empty and the schema is amended to not route data to it, you should be fine to delete. Obviously it is recomended to test this in a dev environment.

    Its much harder removing a filegroup.

    Adam Zacks-------------------------------------------Be Nice, Or Leave

  • Yes there is attached a file group on each partition. That's my problem.

  • so each partition has a filegroup of its own?

    As long as you can ensure that there are no tables, views, objects in the partition and that the schema is such that noto object will every be routed to that partitions, you should be able to delete it.

    This procedure must then be followed for an other partitions in the filegroup.

    Once this is all done and the filegroup is comletely empty (and nothing references i t at all) you should be able to remove.

    Test test test test........

    Good luck 🙂

    Adam Zacks-------------------------------------------Be Nice, Or Leave

  • hbujar (5/5/2010)


    Hi all,

    I create every month automatically partitions for tables, i have a question is it possible to delete the partitions physically from the disc which that partition is empty, but if I delete I'll damage the database structure.

    Thnx to all

    is it a question/learning ? or business requirement ?

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • It's business requirement, it was required from company to create like this.

  • Answer to your question has been given by Schadenfreude-Mei. if you are not satisfied with answer elaborate your question/requirement.

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

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

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