Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start-DbccCheck, better extraction of errors #9624

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

niphlod
Copy link
Contributor

@niphlod niphlod commented Mar 12, 2025

Type of Change

  • Bug fix (non-breaking change, fixes DBCCResult is blank for Test- #9428 )
  • New feature (non-breaking change, adds functionality, fixes # )
  • Breaking change (affects multiple commands or functionality, fixes # )
  • Ran manual Pester test and has passed (Invoke-ManualPester)
  • Adding code coverage to existing functionality
  • Pester test is included
  • If new file reference added for test, has is been added to github.com/dataplat/appveyor-lab ?
  • Unit test is included
  • Documentation
  • Build system

Purpose

Test-DbaLastBackup reported "" instead of the errormessage of checkdb. Checking Start-DbccCheck I noticed that the error wasn't parsed correctly in all cases... this strategy aims to preserve the most of the error message without splitting "blindfully" as before. Notice that probably different PS versions and MS libraries can change the result, so this probably slipped in some time ago and went unnoticed.

Approach

Extract in a loop the innerexception. Split only if text is actually found on the string

@johnsterrett thanks for the report

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.

DBCCResult is blank for Test-
1 participant