徵狀

您可以將資料庫與 SQL Server 2014 或較舊版本上啟用的變更資料捕獲分離,然後將它附加到 Windows 實例上的 SQL Server 2016 或 SQL Server 2017。 在這種情況下,當您執行sp_cdc_enable_table系統程式時,您會遇到下列錯誤:

Command:
EXEC sys.sp_cdc_enable_table @source_schema='<schema name>', @source_name='<source name>', @role_name='<role name>', @supports_net_changes=1, @allow_partition_switch=0;
Error:
Msg 22832, Level 16, State 1, Procedure sp_cdc_enable_table_internal, Line 639 [Batch Start Line 0]
Could not update the metadata that indicates table [<schema name>].[<object name>] is enabled for Change Data Capture. The failure occurred when executing the command 'insert into [cdc].[captured_columns]'. The error returned was 213: 'Column name or number of supplied values does not match table definition.'. Use the action and error to determine the cause of the failure and resubmit the request.

解決方案

若要解決此問題,請在已啟用變更資料捕獲的 Windows 上,在 SQL Server 2016 或 SQL Server 2017 的實例上附加資料庫之後,執行 sp_cdc_vupgrade 。 

其他相關資訊

如需詳細資訊,請參閱附加資料庫

Need more help?

擴展您的技能

探索訓練 >

優先取得新功能

加入 MICROSOFT 測試人員 >

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?

Thank you for your feedback!

×