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


Partitioning : SPLIT seems to use the wrong filegroup ?


Partitioning : SPLIT seems to use the wrong filegroup ?

Author
Message
mmsad ss
mmsad ss
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 1359
Hey folks

I'm trying to use SPLIT on a partitioned table but the placement of the boundaries on filegroups end up as NOT desired.

Here's the situation simplified

- Partitioned table on column year_month

- LEFT Partition function to keep three months worth of data

201201 , 201204 , 201207,2012010

Scheme has five FGs

FG_Min ,FG_2012_Q1,FG_2012_Q2,FG_2012_Q3,FG_2012_Q4


- Wanted to split to create a new partition with boundary of 201301 , so followed these steps

## created new FG 2013_Q1

## Altered Partition scheme set used 2013_Q1

## Alter Partition function SPLIT RANGE (201301)


Everything went successful but when I tried to map the boundaries to file-groups , I found following


2013_Q1 is assigned values from 2012010 to 201301

2012_Q4 is assigned values > 201301


2012_Q1 has a lower partition than 2012_Q4 and the boundary of 2012_Q4 is now NULL


Any idea about what's the cause ? am I missing something ? I'm using SQL 2008 R2 SP1

THX a lot
GilaMonster
GilaMonster
SSC Guru
SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)

Group: General Forum Members
Points: 86150 Visits: 45229
Could you post your actual scheme and function alteration code please?

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


mmsad ss
mmsad ss
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 1359
Voila

ALTER PARTITION SCHEME PS_BY_YEARMONTH_ Next Used 2013_JAN_MAR;


ALTER PARTITION FUNCTION PF_FTD_YEARMONTH() SPLIT RANGE (201301);
GilaMonster
GilaMonster
SSC Guru
SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)

Group: General Forum Members
Points: 86150 Visits: 45229
Looks OK. How did you determine that the wrong data is on the filegroup?

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


mmsad ss
mmsad ss
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 1359
Not really wrong , I just found that the partitions end up not as desired

Current order

parition_number ------- FG_Name -- Left_range -- right_range

6 ------ FG_JAN_Mar-- 201210 ----- 201201

7 ------ FG_OCT_Dec-- 201301 ----- NULL


I would like the opposite for less confusing distribution
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