Thor Logo dbatools

Diagnostic

Get-DbaDump

Garry Bargsley (@gbargsley), blog.garrybargsley.com

Get-DbaDump View Source Garry Bargsley (@gbargsley), blog.garrybargsley.com Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.

Read more

Get-DbaEstimatedCompletionTime

Chrissy LeMaire (@cl), netnerds.net

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

Read more

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-DbaIoLatency

Patrick Flynn (@sqllensman)

Get-DbaIoLatency View Source Patrick Flynn (@sqllensman) Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.

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-DbaPlanCache

Tracy Boggiano, databasesuperhero.com

Get-DbaPlanCache View Source Tracy Boggiano, databasesuperhero.com Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.

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

Get-DbaQueryExecutionTime

Brandon Abshire, netnerds.net

Get-DbaQueryExecutionTime View Source Brandon Abshire, netnerds.net Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.

Read more

Get-DbaSpinLockStatistic

Patrick Flynn (@sqllensman)

Get-DbaSpinLockStatistic View Source Patrick Flynn (@sqllensman) Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.

Read more

Get-DbaTopResourceUsage

Chrissy LeMaire (@cl), netnerds.net

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

Read more
Page 2 of 3