commands

^

Get-DbaExternalProcess

Author Chrissy LeMaire (@cl), netnerds.net
Availability Windows, Linux, macOS

 

Want to see the source code for this command? Check out Get-DbaExternalProcess on GitHub.
Want to see the Bill Of Health for this command? Check out Get-DbaExternalProcess.

Synopsis

Gets OS processes created by SQL Server

Description

Gets OS processes created by SQL Server

Helps when finding hung sessions with External Wait Types

https://web.archive.org/web/20201027122300/http://vickyharp.com/2013/12/killing-sessions-with-external-wait-types/

Syntax

Get-DbaExternalProcess
    [-ComputerName] <DbaInstanceParameter[]>
    [[-Credential] <PSCredential>]
    [-EnableException]
    [<CommonParameters>]

 

Examples

 

Example: 1
PS C:\> Get-DbaExternalProcess -ComputerName SERVER01, SERVER02

Gets OS processes created by SQL Server on SERVER01 and SERVER02

Required Parameters

-ComputerName

The target SQL Server host computer

Alias
Required True
Pipeline true (ByValue)
Default Value

Optional Parameters

-Credential

Allows you to login to $ComputerName using alternative credentials.

Alias
Required False
Pipeline false
Default Value
-EnableException

By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.

Alias
Required False
Pipeline false
Default Value False