Thor Logo dbatools

Process

Get-DbaExternalProcess

Chrissy LeMaire (@cl), netnerds.net

Get-DbaExternalProcess View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.

Read more

Get-DbaOpenTransaction

Chrissy LeMaire (@cl), netnerds.net

Get-DbaOpenTransaction View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.

Read more

Get-DbaProcess

Chrissy LeMaire (@cl), netnerds.net

Get-DbaProcess View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.

Read more

Stop-DbaExternalProcess

Chrissy LeMaire (@cl), netnerds.net

Stop-DbaExternalProcess View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.

Read more

Stop-DbaProcess

Chrissy LeMaire (@cl), netnerds.net

Stop-DbaProcess View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.

Read more