Automation of table partition.

  • I have a partitioned table by quarterly wise. now it has 6 fixed partitions.

    I want to make it automatic. i just want to keep 2 yrs data(8 partitions(one partition for one quarter).

    As new quarter started 1st partition should be deleted and new partition should be added automatically.

    Can any one tell me how to do this?

    Thanks

  • basically, what we do is create an Archive table and a worktable in the same layout as the partition. These tables are created in the same filegroup as the oldest partition. Then we switch the oldest partition with the archivetable. Load the Worktable add all constraints and indexes. Modify the Partition function and scheme and then switch the worktable into the partition.

    For better, quicker answers, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Please don't start new threads for existing questions.

    No further replies to this thread please. Direct replies to http://www.sqlservercentral.com/Forums/Topic1102345-391-1.aspx

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Sorry one one answered.

  • theunique1011 (5/6/2011)


    Sorry one one answered.

    No one answered? There are nine replies to your post, all giving you guidelines and advice.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • theunique1011 (5/6/2011)


    Sorry one one answered.

    You need to have more patience. This is a forum board of volunteers, not a help desk, who work at their own pace and on their own time. If it's that urgent you need to hire someone who knows how to do this.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

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

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