none
sql server table partion each month RRS feed

  • Question

  • Hi Team,

    I have a table which has to keep data of 3 months.  Month by month partitoning is needed here.

    A scheduled job has to run everymonth(likely first sunday of each month) to add a new partition and delete data which is more than 3months/90 days.

    Can you please provide me any script or any related post which can give me some idea?

    Thanks,

    Areef

    Monday, February 10, 2014 2:01 PM

Answers

  • Hi,

    Refer below links

    http://technet.microsoft.com/en-us/library/hh510199.aspx

    http://www.anthonymattas.com/2012/09/creating-partitions-using-dynamic-sql/

    http://blogs.msdn.com/b/sql_pfe_blog/archive/2013/08/13/oops-i-forgot-to-leave-an-empty-sql-table-partition-how-can-i-split-it-with-minimal-io-impact.aspx

    http://www.toadworld.com/platforms/sql-server/w/wiki/9655.partitioned-table-rules-and-gotchas.aspx

    -Prashanth



    Monday, February 10, 2014 2:16 PM

All replies

  • Hi,

    Refer below links

    http://technet.microsoft.com/en-us/library/hh510199.aspx

    http://www.anthonymattas.com/2012/09/creating-partitions-using-dynamic-sql/

    http://blogs.msdn.com/b/sql_pfe_blog/archive/2013/08/13/oops-i-forgot-to-leave-an-empty-sql-table-partition-how-can-i-split-it-with-minimal-io-impact.aspx

    http://www.toadworld.com/platforms/sql-server/w/wiki/9655.partitioned-table-rules-and-gotchas.aspx

    -Prashanth



    Monday, February 10, 2014 2:16 PM
  • Thank you Prashanth, I will see and get back to you tomorrow.
    Monday, February 10, 2014 2:37 PM