Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[source-mssql, docs] add Script for CDC on Transaction Replication Enabled DB #52679

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions docs/integrations/sources/mssql.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,27 @@ For further detail, see the
EXEC sys.sp_cdc_start_job @job_type = 'cleanup';
```

- If you were are using Transaction Replication then the retention has to be changed using below scripts :
```text

EXEC sp_changedistributiondb
@database = 'distribution',
@property = 'max_distretention',
@value = 14400 -- 14400 minutes (10 days)

EXEC sp_changedistributiondb
@database = 'distribution',
@property = 'history_retention',
@value = 14400 -- 14400 minutes (10 days)

USE [msdb]
GO
EXEC msdb.dbo.sp_update_jobstep @job_name=N'Distribution clean up: distribution', @step_id=1 ,
@command=N'EXEC dbo.sp_MSdistribution_cleanup @min_distretention = 0, @max_distretention = 14400'
GO

```

#### 5. Ensure the SQL Server Agent is running

- MSSQL uses the SQL Server Agent
Expand Down
Loading