gpt4 book ai didi

sql-server - SQL Server 2012 更改数据捕获错误 14234

转载 作者:行者123 更新时间:2023-12-04 00:08:04 25 4
gpt4 key购买 nike

我在 SQL Server 2012 实例上设置更改数据捕获时遇到问题。每当我尝试在表上启用 CDC 时,我都会收到以下错误:

Msg 22832, Level 16, State 1, Procedure sp_cdc_enable_table_internal, Line 623
Could not update the metadata that indicates table [dbo].[TableName] is enabled for Change Data Capture.
The failure occurred when executing the command '[sys].[sp_cdc_add_job] @job_type = N'capture''.
The error returned was 22836: 'Could not update the metadata for database [database name] 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.



服务器的名字没改,我试了 sp_dropserver/ sp_addserver解决方案并收到以下错误:

Msg 15015, Level 16, State 1, Procedure sp_dropserver, Line 42
The server 'ServerName' does not exist. Use sp_helpserver to show available servers.

Msg 15028, Level 16, State 1, Procedure sp_addserver, Line 74
The server 'ServerName' already exists.



正如我所说,我正在尝试设置 CDC 而不是复制。 SQL Server 的版本为:11.0.5058.0(SQL Server 2012 SP2)

我看过 Error while enabling CDC on table level并尝试了该解决方案。

我也试过:
exec sys.sp_cdc_add_job @job_type = N'capture'

我收到以下错误:

Msg 22836, Level 16, State 1, Procedure sp_cdc_add_job_internal, Line 282
Could not update the metadata for database [DatabaseName] 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.



任何帮助将不胜感激。

最佳答案

如此处所列,请检查名称是否匹配

SELECT srvname AS OldName FROM master.dbo.sysservers
SELECT SERVERPROPERTY('ServerName') AS NewName

如果没有,请修复:
sp_dropserver '<oldname>';  
GO
sp_addserver '<newname>', local;
GO

关于sql-server - SQL Server 2012 更改数据捕获错误 14234,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29033706/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com