Skip to content

Start-DbaMigration: Enhance handling of dedicated admin connections#10162

Merged
potatoqualitee merged 2 commits intodevelopmentfrom
dac_Start-DbaMigration
Feb 19, 2026
Merged

Start-DbaMigration: Enhance handling of dedicated admin connections#10162
potatoqualitee merged 2 commits intodevelopmentfrom
dac_Start-DbaMigration

Conversation

@andreasjordan
Copy link
Collaborator

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 (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

When opening a connection we test if we need a DAC and we test if we already have a DAC. We reuse a DAC when possible. We remember if we opened a DAC to later be able to close it.

Get-DecryptedObject needs two things:

  • A Dedicated Admin Connection (DAC) to select master.sys.syslnklgns
  • A WinRM connection to read "HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server$serviceInstanceId\Security"

That's why Get-DecryptedObject needs $Credential which it used all the time, but the parameter was missing. So every command that calls Get-DecryptedObject needs $Credential as well. And every command that calls one of those commands as well.

@andreasjordan
Copy link
Collaborator Author

Test "Run Cross Platform Tests / linux-tests (ubuntu-latest) (push)" fails with:
image

@andreasjordan
Copy link
Collaborator Author

I think we now open a DAC connection instead of a normal connection based on the parameters for Start-DbaMigration. Maybe adding "ADMIN:" to what is currently used fails.

@andreasjordan
Copy link
Collaborator Author

Let's exclude "DatabaseMail" as well on github action, so that no dac is needed.

@potatoqualitee
Copy link
Member

This looks pretty standard of a change but i need a non-morning brain to comprehend a little better before merging

@andreasjordan
Copy link
Collaborator Author

No problem. Thanks for merging all the others - now I can work on the last round of fixes for the DAC.

@potatoqualitee
Copy link
Member

Looks good! 🤩

@potatoqualitee potatoqualitee merged commit b0403f5 into development Feb 19, 2026
14 checks passed
@potatoqualitee potatoqualitee deleted the dac_Start-DbaMigration branch February 19, 2026 08:53
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

Comments