dsccommunity / dsccommunity/SqlServerDsc

SqlReplication: Refactor resource into two resources

Open
#1,527 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

breaking change enhancement help wanted
Dominant language
PowerShell
Stars
385
Forks
224
PR merge metrics
No merged PRs in 30d

Description

If the same instance should be both distributor and publisher that does not currently work with the current implementation with SqlServerReplication. Although I have limited knowledge of replication so not sure if there is a limitation here that I'm not aware of but the section here suggest it is possible.

..(in many cases, the Publisher and Distributor are the same server..
https://docs.microsoft.com/en-us/sql/relational-databases/replication/configure-publishing-and-distribution?view=sql-server-ver15#SSMSProcedure

I suggest that the resource SqlServerReplication is refactored into two new resource and removing the resource SqlServerReplication. The two new resource could be named SqlServerDistributor and SqlServerPublisher.

Additional information:

Although this might be an issue if one instance can only be either publisher or distributor.

To configure publishing and distribution on a single server
https://docs.microsoft.com/en-us/sql/relational-databases/replication/configure-publishing-and-distribution?view=sql-server-ver15#to-configure-publishing-and-distribution-on-a-single-server

The Distributor is a server that contains the distribution database, which stores metadata and history data for all types of replication and transactions for transactional replication. To set up replication, you must configure a Distributor. Each Publisher can be assigned to only a single Distributor instance, but multiple publishers can share a Distributor.
...
By default, the Distributor is the same server as the Publisher (a local Distributor), but it can also be a separate server from the Publisher (a remote Distributor).
https://docs.microsoft.com/en-us/sql/relational-databases/replication/configure-distribution?view=sql-server-ver15

The resources should also support this
https://docs.microsoft.com/en-us/sql/relational-databases/replication/configure-distribution-availability-group?view=sql-server-ver15

Docs over how to use RMO:
https://docs.microsoft.com/en-us/sql/relational-databases/replication/configure-publishing-and-distribution?view=sql-server-ver15#RMOProcedure

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing SqlServerReplication resource and the linked Microsoft SQL Server publishing, distribution, and RMO documentation. Define the behavior and validation needed for separate SqlServerDistributor and SqlServerPublisher resources, including local publisher/distributor and distribution availability-group configurations.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, sql
Domain
databases, devops
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.