SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Adding more ranges to the partition function.


Adding more ranges to the partition function.

Author
Message
born4learn
born4learn
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 23
Hi ,
We have partitions for below table XXXX from last 2 years in order to add 2 more years I thought I can do alter partition function but it is giving me syntax error. Can some tell me this is the right way to do it ?


ALTER PARTITION FUNCTION [fun_XXXX]()
{ SPLIT RANGE (
'2009-01-01T00:00:00',
N'2009-02-01T00:00:00',
N'2009-03-01T00:00:00',
N'2009-04-01T00:00:00',
N'2009-05-01T00:00:00',
N'2009-06-01T00:00:00',
N'2009-07-01T00:00:00',
N'2009-08-01T00:00:00',
N'2009-09-01T00:00:00',
N'2009-10-01T00:00:00',
N'2009-11-01T00:00:00',
N'2009-12-01T00:00:00',
)
};
Stad
Stad
SSC-Enthusiastic
SSC-Enthusiastic (116 reputation)SSC-Enthusiastic (116 reputation)SSC-Enthusiastic (116 reputation)SSC-Enthusiastic (116 reputation)SSC-Enthusiastic (116 reputation)SSC-Enthusiastic (116 reputation)SSC-Enthusiastic (116 reputation)SSC-Enthusiastic (116 reputation)

Group: General Forum Members
Points: 116 Visits: 121
born4learn,

I am at right same situtation as yours.

Can you please post the solution that how you were able increase partition range from 2 years to 4 years.

Thanks in advance!
Stad
julie.rasnick
julie.rasnick
Grasshopper
Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)

Group: General Forum Members
Points: 21 Visits: 74
You need to issue one split statement per new range.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search