I am getting the below error when trying to enable CDC on a table with a clustered columnstore index:

Change Data Capture cannot be enabled on a table with a clustered columnstore index. Consider dropping clustered columnstore index

But I need to have both CDC and clustered columnstore index on the same table.

Is there any workaround to this limitation?

1

There are 1 answers

0
Dmytro Sly On BEST ANSWER

The workaround to this is to enable CDC first and then to create a clustered columnstore index.

  1. Drop a clustered columnstore index if exists.
  2. Enable CDC.
  3. Create a clustered columnstore index.

Voila! It works!