码迷,mamicode.com
首页 > 数据库 > 详细

SSIS CDC(Change Data Capture)组件在数据库中启用报错。 The error returned was 14234: 'The specified '@server' is invalid

时间:2015-01-30 10:36:52      阅读:326      评论:0      收藏:0      [点我收藏+]

标签:

昨天实验CDC,在数据库中执行以下语句的时候出错。

EXEC sys.sp_cdc_enable_table
  @source_schema = Nstg,
  @source_name = NCDCSalesOrderHeader,
  @role_name = Ncdc_role,
  @supports_net_changes = 1;


Msg 22832, Level 16, State 1, Procedure sp_cdc_enable_table_internal, Line 623
Could not update the metadata that indicates table [stg].[CDCSalesOrderHeader] is enabled for Change Data Capture. The failure occurred when executing the command [sys].[sp_cdc_add_job] @job_type = Ncapture‘‘. The error returned was 22836: Could not update the metadata for database TK463DW to indicate that a Change Data Capture job has been added. The failure occurred when executing the command sp_add_jobstep_internal. The error returned was 14234: The specified @server is invalid (valid values are returned by sp_helpserver).. Use the action and error to determine the cause of the failure and resubmit the request.. Use the action and error to determine the cause of the failure and resubmit the request.


一开始看到一个方案,把数据库的owner改为SA。执行以后无效。

EXEC sp_changedbowner sa

根据下面错误又查了一下,才发现是因为我改了计算机名字,导致数据库中的实例名不一样。

The error returned was 14234: The specified @server is invalid (valid values are returned by sp_helpserver)

处理步骤:

 1.执行sp_helpserver查看当前实例清单

EXEC sp_helpserver 

2. 使用sp_addserver 添加实例名

EXEC sp_addserver WIN2K8\SQL2K8

sp_addserver 在SQL Server 2012 中已经淘汰,需要改用sp_addlinkedserver

EXEC sp_addlinkedserver WIN2K8\SQL2K8,SQL Server

3. 再次执行CDC代码即可

 

参考文档

#0164-SQL Server 2012-Discontinued Features-sp_addserver-Remote server registration-Msg: 15663

 

 

 

SSIS CDC(Change Data Capture)组件在数据库中启用报错。 The error returned was 14234: 'The specified '@server' is invalid

标签:

原文地址:http://www.cnblogs.com/haseo/p/4261577.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!