Get-DbaExternalProcess View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Retrieves operating system processes spawned by SQL Server instances
Description Identifies and returns all child processes created by SQL Server, such as those spawned by xp_cmdshell, BCP operations, SSIS packages, or other external utilities.
This is particularly useful when troubleshooting sessions with External Wait Types, where SQL Server is waiting for an external process to complete. When sessions appear hung with wait types like WAITFOR_RESULTS or EXTERNAL_SCRIPT_NETWORK_IO, this command helps identify the specific external processes that may be causing the delay.
Get-DbaOpenTransaction View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Retrieves detailed information about open database transactions across SQL Server instances.
Description Queries SQL Server dynamic management views to identify open transactions that may be causing blocking, consuming transaction log space, or impacting performance. Returns comprehensive details including session information, database context, transaction duration, log space usage, and the last executed query with its execution plan.
This is particularly useful when troubleshooting blocking issues, investigating long-running transactions, or monitoring transaction log growth.
Get-DbaProcess View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Retrieves active SQL Server processes and sessions with detailed connection and activity information.
Description Displays comprehensive information about SQL Server processes including session details, connection properties, timing data, and the last executed SQL statement. This function combines data from multiple system views to provide a complete picture of current database activity.
Use this to monitor active connections, identify blocking processes, track application connections, troubleshoot performance issues, or audit database access patterns.
Stop-DbaExternalProcess View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Terminates operating system processes spawned by SQL Server instances
Description Terminates external processes that were created by SQL Server, such as those spawned by xp_cmdshell, BCP operations, SSIS packages, or external script executions. This function is designed to work with the output from Get-DbaExternalProcess to resolve specific performance issues.
The primary use case is troubleshooting hung SQL Server sessions that display External Wait Types like WAITFOR_RESULTS or EXTERNAL_SCRIPT_NETWORK_IO.
Stop-DbaProcess View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Terminates SQL Server processes (SPIDs) to resolve blocking, kill runaway queries, or clean up connections.
Description Terminates SQL Server processes by targeting specific SPIDs, logins, hostnames, programs, or databases. This is essential for resolving blocking situations, stopping runaway queries that consume resources, or cleaning up abandoned connections from applications or users.
The function automatically prevents you from killing your own connection session to avoid disconnecting yourself.