As many of the dbatools contributors wander around the community, writing blogs and presenting at events we’re often asked the same question.
When will dbatools support replication?
Replication, everyone loves to hate it, but it’s been our most requested feature as far as adding commands to dbatools. For ages we’ve said ‘sounds great’ and ‘we would love that’, but when we started looking into it the energy soon fizzled away, due to it’s dependency on RMO - Replication Management Objects, as opposed to SMO - SQL Server Management Objects, things weren’t as easy as we had hoped.
It finally happened!
But, finally, after much effort we now have replication support within dbatools! This is our first adventure into these commands, and they have been written in a way that you, the community, can immediately start using them and then telling us what else they need and\or want.
As of v2.1.1 of dbatools we can now say we support replication!
We didn’t want to get stuck forever in development as we tried to cover every possible scenario and use case - instead we wanted to get this release into your hands as soon as we could.
This series of blog posts will walk through how you can use all the commands we currently have available and we recommend you read this through, and test these out with your replication topologies (preferably in a test environment first) and let us know what’s missing. You can tell us all about it by opening a new issue on GitHub.
So what commands do we have available?
Well, running the following code will give you an up-to-date list, but at this exact moment we have 20 commands available.
|
|
These all have comment based help within the commands that you can read within your PowerShell console with Get-Help
or by reviewing the online version - linked below. Some of these commands already existed and have been updated to work better, but a lot of these are brand new!
- Add-DbaReplArticle
- Disable-DbaReplDistributor
- Disable-DbaReplPublishing
- Enable-DbaReplDistributor
- Enable-DbaReplPublishing
- Export-DbaReplServerSetting
- Get-DbaReplArticle
- Get-DbaReplArticleColumn
- Get-DbaReplDistributor
- Get-DbaReplPublication
- Get-DbaReplPublisher
- Get-DbaReplServer
- Get-DbaReplSubscription
- New-DbaReplCreationScriptOptions
- New-DbaReplPublication
- New-DbaReplSubscription
- Remove-DbaReplArticle
- Remove-DbaReplPublication
- Remove-DbaReplSubscription
- Test-DbaReplLatency
Tell me more
This is an exciting time, but this is just the introductory post for a series on this topic, keep your eyes out for the following which should be released in the coming weeks in the lead up to SQLBits 2024:
- dbatools - introducing replication support - this post!
- dbatools Replication: The Get commands
- dbatools Replication: Setup replication with dbatools
- dbatools Replication: Tear down replication with dbatools
You can also view any posts I’ve written on Replication by heading to the Replication Category page of this blog.