Get-DbaAgRingBuffer - Add command for HADR ring buffer diagnostics#10282
Merged
Conversation
Implements Get-DbaAgRingBuffer to query sys.dm_os_ring_buffers for the four HADR-specific ring buffer types used in Always On AG diagnostics: RING_BUFFER_HADRDBMGR_API, RING_BUFFER_HADRDBMGR_STATE, RING_BUFFER_HADRDBMGR_COMMIT, and RING_BUFFER_HADR_TRANSPORT_STATE. Returns raw XML records alongside metadata (EventTime, RingBufferType, RecordId) so callers have full access to the unsupported-but-useful diagnostic data without brittle type-specific XML parsing. Requires SQL Server 2012+ (MinimumVersion 11) as Always On was introduced in that release. Closes #9823 (do Get-DbaAgRingBuffer) Co-authored-by: Andreas Jordan <andreasjordan@users.noreply.github.com>
Contributor
|
Looks good to me. The timestamp stuff looks a bit weird, but it made sense once I remembered the definition of the timestamp column. I wonder if a |
Collaborator
Author
|
@claude please have a look at the last comment. I think we should add CollectionMinutes for consistency with Get-DbaCpuRingBuffer. |
|
Claude finished @andreasjordan's task in 1m 31s —— View job Adding
|
… with Get-DbaCpuRingBuffer (do Get-DbaAgRingBuffer) Co-authored-by: Andreas Jordan <andreasjordan@users.noreply.github.com>
Member
|
awesome, thank you both 💯 |
potatoqualitee
added a commit
that referenced
this pull request
Apr 10, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements
Get-DbaAgRingBufferto expose the internal HADR ring buffers for Always On AG diagnostics.Queries
sys.dm_os_ring_buffersfor the four HADR-specific types:RING_BUFFER_HADRDBMGR_API,RING_BUFFER_HADRDBMGR_STATE,RING_BUFFER_HADRDBMGR_COMMIT, andRING_BUFFER_HADR_TRANSPORT_STATE.Returns raw XML records alongside metadata so callers have full access to the diagnostic data without fragile type-specific XML parsing.
Closes #9823
Generated with Claude Code