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

Fix .Query() and .Invoke() on server for special connections and enhance exception text #9410

Merged
merged 2 commits into from
Jun 29, 2024

Conversation

andreasjordan
Copy link
Contributor

Type of Change

  • Bug fix (non-breaking change, fixes # )
  • 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

Part 1: Fix for connections to Azure SQL Database with token

In these connections, the databases part of the SMO is not usable and so it has to be used the ConnectionContext of the server to execute the Query.

Part 2: Better exception message

Old:
image

New:
image

@andreasjordan
Copy link
Contributor Author

@potatoqualitee Is type-extensions.ps1 still used? I have not found a reference in the code and the code inside of that file is not active.

@andreasjordan andreasjordan changed the title Fix .Query() and .Invoke() on server for special connections and enhance exception test Fix .Query() and .Invoke() on server for special connections and enhance exception text Jun 25, 2024
@andreasjordan
Copy link
Contributor Author

Ok, found the reference and removed it. Let's see if that works...

@potatoqualitee
Copy link
Member

looks good, thank you

@potatoqualitee potatoqualitee merged commit dfc9e3e into development Jun 29, 2024
13 checks passed
@potatoqualitee potatoqualitee deleted the dbatools_Types_xml branch June 29, 2024 01:06
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.

2 participants