Get-DbaDump View Source Garry Bargsley (@gbargsley), blog.garrybargsley.com Windows, Linux, macOS Synopsis Retrieves SQL Server memory dump file information from sys.dm_server_memory_dumps DMV.
Description Queries the sys.dm_server_memory_dumps dynamic management view to return details about memory dump files (.mdmp) generated by SQL Server. Memory dumps are created when SQL Server encounters crashes, assertion failures, or other critical errors that require investigation. This function helps DBAs quickly identify when dumps have been generated, their size, and creation time, which is essential for troubleshooting server stability issues and working with Microsoft Support for crash analysis.
Get-DbaEstimatedCompletionTime View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Monitors progress and estimated completion times for long-running SQL Server operations
Description Retrieves real-time progress information for long-running SQL Server maintenance and administrative operations by querying sys.dm_exec_requests. This function helps DBAs monitor the status of time-intensive tasks without having to guess when they’ll complete or manually check SQL Server Management Studio.
Shows progress details including percent complete, running time, estimated time remaining, and projected completion time.
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-DbaIoLatency View Source Patrick Flynn (@sqllensman) Windows, Linux, macOS Synopsis Retrieves I/O latency metrics for all database files to identify storage performance bottlenecks
Description Queries sys.dm_io_virtual_file_stats to collect detailed I/O performance statistics for every database file on the SQL Server instance. Returns calculated latency metrics including read latency, write latency, and overall latency in milliseconds, plus throughput statistics like average bytes per read and write operation. Essential for diagnosing slow database performance caused by storage bottlenecks, helping you identify which specific database files are experiencing high I/O wait times.
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-DbaPlanCache View Source Tracy Boggiano, databasesuperhero.com Windows, Linux, macOS Synopsis Retrieves single-use plan cache usage to identify memory waste from adhoc and prepared statements
Description Analyzes the plan cache to identify memory consumed by single-use adhoc and prepared statements that are unlikely to be reused. These plans accumulate over time and can consume significant memory without providing performance benefits.
When applications generate dynamic SQL without proper parameterization, each unique statement creates its own execution plan.
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.
Get-DbaQueryExecutionTime View Source Brandon Abshire, netnerds.net Windows, Linux, macOS Synopsis Retrieves stored procedures and SQL statements with the highest CPU execution times from SQL Server instances.
Description Analyzes SQL Server’s query execution statistics to identify performance bottlenecks by examining CPU worker time data from dynamic management views. This function queries sys.dm_exec_procedure_stats for stored procedures and sys.dm_exec_query_stats for ad hoc statements, returning detailed execution metrics including average execution time, total executions, and maximum execution time.
Get-DbaSpinLockStatistic View Source Patrick Flynn (@sqllensman) Windows, Linux, macOS Synopsis Retrieves spinlock contention statistics from SQL Server’s internal synchronization mechanisms
Description Queries sys.dm_os_spinlock_stats to return detailed statistics about SQL Server’s spinlock usage and contention. Spinlocks are lightweight synchronization primitives that SQL Server uses internally for very brief waits when protecting critical code sections and memory structures.
This information helps diagnose severe performance issues caused by spinlock contention, which typically manifests as high CPU usage with poor throughput.
Get-DbaTopResourceUsage View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Identifies the most resource-intensive cached queries from sys.dm_exec_query_stats for performance troubleshooting
Description Analyzes cached query performance by examining sys.dm_exec_query_stats to find your worst-performing queries across four key metrics: total duration, execution frequency, IO operations, and CPU time. Each metric returns the top consumers (default 20) grouped by query hash, so you can quickly spot patterns in problematic queries that are dragging down server performance.