Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Partition Table Switch Error Expand / Collapse
Author
Message
Posted Monday, November 22, 2010 12:55 PM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Monday, August 11, 2014 9:44 AM
Points: 770, Visits: 1,597
Hi All
I have created a partition table on a database and I can see that the partition has been created. I have created an other table where i want to switch the partition to, This partition table has got all the same structure, but when i tried to switch partition i am getting the below error.


SQL used to switch the partition

ALTER TABLE CDR_0_test
SWITCH PARTITION 10
TO [CDR_0_Test_Part]
GO


Error recived
Msg 4913, Level 16, State 1, Line 1
ALTER TABLE SWITCH statement failed. The table 'GBR_Test.dbo.CDR_0_test' has clustered index 'GBR_CDR_0_Test_IX_Xharging_TimeStamp_Partition' while the table 'GBR_Test.dbo.CDR_0_Test_Part' does not have clustered index.





Thanks for your help in advance

Post #1024614
Posted Monday, November 22, 2010 1:07 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:09 PM
Points: 40,172, Visits: 36,560
The error states that the clustered index is different. Is it?


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
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

Post #1024627
Posted Monday, November 22, 2010 1:56 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 2:09 PM
Points: 6,465, Visits: 13,918

The table 'GBR_Test.dbo.CDR_0_test' has clustered index 'GBR_CDR_0_Test_IX_Xharging_TimeStamp_Partition' while the table 'GBR_Test.dbo.CDR_0_Test_Part' does not have clustered index.



?


-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs"
Post #1024674
Posted Tuesday, November 23, 2010 2:46 AM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Monday, August 11, 2014 9:44 AM
Points: 770, Visits: 1,597
Thanks Gail
I have tried with the clustered index as well, but when i tried with all the index that exists on the parent table its not working, now i am getting an error which is as below



Msg 7733, Level 16, State 4, Line 1
'ALTER TABLE SWITCH' statement failed. The table 'GBR_Test.dbo.CDR_0_test' is partitioned while index 'CDR_call_type_Idx' is not partitioned.


But when i went through the partitioning concept its said that partition can be moved to a non partitioned table as well.

I am a bit confused

Post #1024939
Posted Tuesday, November 23, 2010 6:07 AM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Monday, August 11, 2014 9:44 AM
Points: 770, Visits: 1,597
Thanks Guys
I have done it, I have created the table on the same file group as with the partition and then switched and it worked as a magic

Regards

Post #1025087
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse