Home > database >  SQL server2012 create CDC, to enable the CDC report errors, a great god help solve
SQL server2012 create CDC, to enable the CDC report errors, a great god help solve

Time:11-13

Message 22832, level 16, state 1, process sp_cdc_enable_table_internal, line 623
Cannot update metadata to indicate that has been on the table [dbo] [SrcTab] enabled change data capture, execute the command '[sys]. [sp_cdc_add_job] @ job_type=N' capture 'failure, when the return error of 22836:' unable to update the database Src metadata to indicate that has added a change data capture, execute the command 'sp_add_jobstep_internal' fails, the return error of 14234: ' '@ server specified is invalid (RMS) returned by the sp_helpserver,', please use this operation and error to determine the cause of the failure and to submit a request, ', please use this operation and error to determine the cause of the failure and to submit a request,

CodePudding user response:

The parameter is invalid

CodePudding user response:

The EXEC sys. Sp_cdc_enable_table
@ source_schema=N 'dbo
, @ source_name=N 'SrcTab'
, @ role_name=N 'cdc_admin - increasing the role of
, @ capture_instance=N 'MSSQLSERVER' - the instance name
, @ supports_net_changes=1
, @ captured_column_list=N 'xh, Name, VALUE, OperationTime' - track field
, @ filegroup_name=N 'PRIMARY';
GO
This is to enable the CDC change statements, which parameter is invalid

CodePudding user response:

modify the SQL Server after installing the hostname, lead to the results of the two statements "servname" inconsistent solution, execute the following command and then again to start the table level CDC command:

IF serverproperty (' servername) & lt;> @ @ servername
The BEGIN
DECLARE @ server SYSNAME
The SET @ server=@ @ servername
The EXEC sp_dropserver @ server=@ server
The SET @ server=cast (serverproperty (' servername) AS SYSNAME)
The EXEC sp_addserver @=@ server server, @ local='local'
PRINT 'ok! '
END
The ELSE
PRINT 'undo!
  • Related