dataplat / dbatools

🚀 SQL Server automation and instance migrations have never been safer, faster or freer
https://dbatools.io
MIT License
2.39k stars 787 forks source link

Get-DbaProcess - Add information about endpoint and DAC #9304

Closed andreasjordan closed 2 months ago

andreasjordan commented 3 months ago

Type of Change

Purpose

I added information about the used endpoint and if it's the DAC (dedicated admin connection) endpoint to support analyzing problems with commands that need a DAC. This way we can easily tell if there is already an open DAC to the instance.

Commands to test

$dacProcess = Get-DbaProcess -SqlInstance SQL01 | ? IsDac
if ($dacProcess) {
    Write-Warning -Message "There is currently an open DAC with SPID $($dacProcess.Spid) from host $($dacProcess.HOST)."
    $dacProcess | Format-List *
}
potatoqualitee commented 2 months ago

very nice! thank you 🙇🏼