While work with Microsoft SQL Server (log based)source endpoint, to enable MS-REPLICATION in Microsoft SQL Server Management Studio (SSMS) for a Microsoft SQL Server, follow these steps:
Open SSMS
Right-click on the Replication folder in the Object Explorer
Select Configure Distribution from the context menu
Click Finish
By default, Qlik Replicate should handle the rest of the CDC configuration on the SQL Server. However, you may receive the following error when starting a task:
[SOURCE_CAPTURE ]E: Failed (retcode -1) to execute statement: exec sp_replicationdboption @dbname = N'QCDI_Source', @optname = N'publish', @value = N'true' [1022502] (ar_odbc_stmt.c:5066) [SOURCE_CAPTURE ]E: RetCode: SQL_ERROR SqlState: 42000 NativeError: 20028 Message: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]The Distributor has not been installed correctly. Could not enable database for publishing. Line: 1 Column: -1 [1022502] (ar_odbc_stmt.c:5074)
Resolution
This issue can occur when configuring the distribution while connected to the SQL Server using an IP address. To resolve this, connect to the SQL Server using the server host name (in below sample the server host name is "MSSQL2017") rather than the IP address when configuring the distribution.