dsccommunity / dsccommunity/SqlServerDsc
SqlAg/SqlAGReplica: AlwaysOn_Health XE session
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 385
- Forks
- 224
- PR merge metrics
- No merged PRs in 30d
Description
Details of the scenario you tried and the problem that is occurring
SqlAg is the resource that will create an availability group on a given instance. Then you have SqlAgReplica that will add a replica.
A big step that is missing in the process is enabling the AlwaysOn_health extended event session. This is something the SQLPS or sqlserver modules commands do not handle directly either in an automatic fashion; meaning that creating an AG with either module will not automatically enable that XE session either.
If the wizard is used it does indeed enable that XE session automatically for the user. So as I see it we could do this one of two ways:
- Update the SqlAg and SqlAgReplica resources to have an option to enable that XE session, something like
EnableAlwaysOnHealthmaybe. - Create a new resource (i.e. SqlAgAlwaysOnHealth).
I would favor it being added to the SqlAg and AgReplica resources because I would also say the property should be set to true by default. There are not generally any situation where I have seen that XE session should be disabled, but in the rare case it does having the property would benefit.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the SqlAg and SqlAgReplica resources and how they configure an availability group. Decide how the AlwaysOn_health extended event session should be exposed, with the favored approach adding an option enabled by default. Done means creating an AG or replica can enable that session while still allowing it to be disabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, sql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100