January 23, 2020 at 7:42 am
hello
Good morning all
I want to switch the partition from one table to another
I have this error message on a blocking because of the index
ALTER TABLE sales.SalesOrderDetail
SWITCH PARTITION 1 TO
sales.SalesOrderDetail_2014 PARTITION 1;
Warning: the partition specified 1 for the table 'produit.sales.SalesOrderDetail_2014' was ignored in the ALTER TABLE SWITCH statement, because the table is not partitioned.
Msg 7733, Level 16, State 4, Line 1
The 'ALTER TABLE SWITCH' statement failed. table 'produit.Sales.SalesOrderDetail' is partitioned while index 'IX_SalesOrderDetail_ProductID' is not.
End time: 2020-01-23T08: 34: 45.9707743 + 01: 00
thanks
January 23, 2020 at 8:55 am
error is pretty clear - produit.sales.SalesOrderDetail_2014 is not partitioned - the image you posted is for the table sales.SalesOrderDetail
if your partitions are yearly and if you archive onto 1 table per year then most likely what you need is
ALTER TABLE sales.SalesOrderDetail
SWITCH PARTITION 1 TO
sales.SalesOrderDetail_2014 -- remove the destination partition
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply