Deleting a horizontal Partition in SQL Server 2008

  • Can we really delete the partition (including data) in SQL Server 2008 without affecting the rest of the partitions.

    What are the pros and cons?

  • it depends on what type of partition. a hard drive partition with no data from the database? thats no problem. now you will loose every thing else on that partition but since you mentioned that im guessing it does not matter.

    in a partitioned table? i would delete the data you dont need then drop the partition from the table definition then delete the file.


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

  • capn.hector (3/21/2012)


    in a partitioned table? i would delete the data you dont need then drop the partition from the table definition then delete the file.

    Umm... No. In a partitioned table I would switch out the partition to a new table and then drop the new table to delete the data. Chances are that you want to keep the file itself and deleting data can be too resource intensive.

    Jared
    CE - Microsoft

  • Thanks All for your replies. The content made sense

Viewing 4 posts - 1 through 3 (of 3 total)

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