Skip to content

Invoke-DbaDbShrink - Add error message output for failed shrink operations#10258

Draft
andreasjordan wants to merge 2 commits intodevelopmentfrom
claude/issue-10033-20251202-1615
Draft

Invoke-DbaDbShrink - Add error message output for failed shrink operations#10258
andreasjordan wants to merge 2 commits intodevelopmentfrom
claude/issue-10033-20251202-1615

Conversation

@andreasjordan
Copy link
Collaborator

Summary

Enhances Invoke-DbaDbShrink to output detailed error messages when shrink operations fail or don't achieve their target size. This addresses issue #10033 about tempdb shrink operations that commonly fail or only partially complete.

Changes

  • Capture detailed exception messages including inner exceptions
  • Display warning messages when shrink operations fail
  • Detect partial shrinks (common in tempdb with active transactions)
  • Include error details in the Notes property of output objects

Fixes #10033

Generated with Claude Code

github-actions bot and others added 2 commits December 2, 2025 16:17
…tions

This change enhances error reporting when shrink operations fail or don't achieve their target size:

- Capture detailed exception messages including inner exceptions
- Display warning messages when shrink operations fail
- Detect partial shrinks (common in tempdb with active transactions)
- Include error details in the Notes property of output objects

Fixes #10033

(do Invoke-DbaDbShrink)

Co-authored-by: Chrissy LeMaire <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invoke-DbaDbShrink: let files be shrunk evenly and say why they don't shrink

1 participant