SQL Server Error Msg 22842 – ALTER TABLE SWITCH statement failed because the partitioned destination table is enabled for Change Data Capture and does not have @allow_partition_switch set to 1.

In this blog post, let’s learn about the error message “22842 – ALTER TABLE SWITCH statement failed because the partitioned destination table is enabled for Change Data Capture and does not have @allow_partition_switch set to 1.” in Microsoft SQL Server, the reason why it appears and the solution to fix it.

SQL Server Error Message

22842 – ALTER TABLE SWITCH statement failed because the partitioned destination table is enabled for Change Data Capture and does not have @allow_partition_switch set to 1.

Reason for the Error

To be update soon…

Solution

To be update soon…