question

Utkarsh_Walke avatar image
Utkarsh_Walke asked

partition table in sql

I want partition database on a monthly basis from Jan'12 to Jan'20. Results should be like, for a current fiscal, for Dec'2016 data shuld be in Primary group, at the end of this Fiscal year, it should move in a file group and a new filegroup should be created for the Jan'2017. Can you pls share the code to achieve this.?
pl-sql
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Magnus Ahlkvist avatar image
Magnus Ahlkvist answered
You could MERGE the partition in PRIMARY with a partition in Another filegroup, set next used on the partition scheme to the other file Group and then split the partition you merged into, in order to get it to its own partition again. Have a look at this article, where it's examplified: http://weblogs.sqlteam.com/dang/archive/2011/04/17/move-a-partition-to-a-different-file-group-efficiently.aspx
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thanks Magnus Ahlkvist.. 'll try with this method. Thanks again for quick responce.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.