From fc970e26998af5b1beae3fc4891a00d5c47425d6 Mon Sep 17 00:00:00 2001 From: Andy Stark Date: Tue, 12 Nov 2024 10:53:38 +0000 Subject: [PATCH 1/2] DOC-4551 added SQL Server Agent troubleshooting note --- .../data-pipelines/prepare-dbs/sql-server.md | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/content/integrate/redis-data-integration/data-pipelines/prepare-dbs/sql-server.md b/content/integrate/redis-data-integration/data-pipelines/prepare-dbs/sql-server.md index 8f1123e25..6a59f48d9 100644 --- a/content/integrate/redis-data-integration/data-pipelines/prepare-dbs/sql-server.md +++ b/content/integrate/redis-data-integration/data-pipelines/prepare-dbs/sql-server.md @@ -131,6 +131,33 @@ Follow the steps below to run `sys.sp_cdc_help_change_data_capture`: access. If the result is empty then you should check that you have privileges to access both the capture instance and the CDC tables. +### Troubleshooting + +If no CDC is happening then it might mean that SQL Server Agent is down. +You can check for this using the SQL query shown below: + +```sql +IF EXISTS ( SELECT 1 + FROM master.dbo.sysprocesses + WHERE program_name = N'SQLAgent - Generic Refresher') +BEGIN + SELECT @@SERVERNAME AS 'InstanceName', 1 AS 'SQLServerAgentRunning' +END +ELSE +BEGIN + SELECT @@SERVERNAME AS 'InstanceName', 0 AS 'SQLServerAgentRunning' +END +``` + +If the query returns a result of `0`, you need to need to start +SQL Server Agent using the following commands: + +```sql +EXEC xp_servicecontrol N'START',N'SQLServerAGENT'; +GO +``` + + ## SQL Server on Azure You can also use the Debezium SQL Server connector with SQL Server on Azure. From 495737146bf9d7a07f265a21df7e6f0265924cab Mon Sep 17 00:00:00 2001 From: Andy Stark Date: Tue, 12 Nov 2024 10:54:21 +0000 Subject: [PATCH 2/2] DOC-4551 removed redundant newline --- .../data-pipelines/prepare-dbs/sql-server.md | 1 - 1 file changed, 1 deletion(-) diff --git a/content/integrate/redis-data-integration/data-pipelines/prepare-dbs/sql-server.md b/content/integrate/redis-data-integration/data-pipelines/prepare-dbs/sql-server.md index 6a59f48d9..a5eaf7535 100644 --- a/content/integrate/redis-data-integration/data-pipelines/prepare-dbs/sql-server.md +++ b/content/integrate/redis-data-integration/data-pipelines/prepare-dbs/sql-server.md @@ -157,7 +157,6 @@ EXEC xp_servicecontrol N'START',N'SQLServerAGENT'; GO ``` - ## SQL Server on Azure You can also use the Debezium SQL Server connector with SQL Server on Azure.