dbatools
dbatools copied to clipboard
Create contained availability group
Summarize Functionality
Would love to be able to create new contained availability group, either with New-DbaAvailabilityGroup or a new command? Also query whether or not an AG is contained. Thank you!
Is there a command that is similiar or close to what you are looking for?
Yes
Technical Details
Something like "New-DbaAvailabilityGroup -Primary sql01\inst01 -Secondary sql02\inst02 -Name "ag01" -Database "Database01" -Contained $true
Or, -Contained just as a switch
Contained Availability Group is a SQL Server 2022 only feature. At a minimum this cannot be implemented until we are using SMO version that supports full SQL Server 2022 compatibility in the dbatools.library.
Not a priority right now but if anyone would like to submit a PR post 2.0 release, we are happy to review and accept.
Quick check in SMO the preview release does not show support of this as of yet. I'm not sure if sqlserver module is supporting this already.
At this time, we can't support it but will leave the issue open until we find SMO can support it.
Thank you!
Hi, what is the status on this? It seems that the SMO does support contained AGs. It's just not documented as of yet. https://github.com/microsoft/sqlmanagementobjects/issues/154 Would really love to see this feature implemented.
I have a solution for this I developed and tested for my own environment. I'll get that posted shortly.
@thewaiting28 looks like you can stop waiting