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

Copy-DbaResourceGovernor: Fix copy of classifier function #9492

Merged
merged 4 commits into from
Oct 14, 2024

Conversation

andreasjordan
Copy link
Contributor

Type of Change

  • Bug fix (non-breaking change, fixes Copy-DbaResourceGovernor - Fails to copy classifier function #9491 )
  • New feature (non-breaking change, adds functionality, fixes # )
  • Breaking change (affects multiple commands or functionality, fixes # )
  • Ran manual Pester test and has passed (.\tests\manual.pester.ps1)
  • 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

See issue for details.

@andreasjordan
Copy link
Contributor Author

Test works and shows that the classifier function was not copied but reported as failed:

image

@andreasjordan
Copy link
Contributor Author

No I can try to fix the command itself...

@andreasjordan
Copy link
Contributor Author

ChatGPT was lying...

But later gave this solution:

# Filter out lines containing SET QUOTED_IDENTIFIER and SET ANSI_NULLS
$filteredScript = $script | Where-Object { $_ -notmatch 'SET QUOTED_IDENTIFIER' -and $_ -notmatch 'SET ANSI_NULLS' }

@andreasjordan andreasjordan marked this pull request as ready for review October 9, 2024 19:05
@andreasjordan andreasjordan requested a review from niphlod October 9, 2024 19:42
@potatoqualitee potatoqualitee merged commit b1962cc into development Oct 14, 2024
13 checks passed
@potatoqualitee potatoqualitee deleted the CopyDbaResourceGovernor_fix branch October 14, 2024 07:46
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.

Copy-DbaResourceGovernor - Fails to copy classifier function
3 participants