Thor Logo dbatools

Performance

Export-DbaExecutionPlan

Chrissy LeMaire (@cl), netnerds.net

Export-DbaExecutionPlan View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Extracts execution plans from plan cache and saves them as .sqlplan files for analysis Description Queries the SQL Server plan cache using dynamic management views and exports execution plans as XML files with .sqlplan extensions. These files can be opened directly in SQL Server Management Studio for detailed analysis and troubleshooting. The function retrieves both single statement plans and batch query plans from sys.

Read more

Export-DbaPfDataCollectorSetTemplate

Chrissy LeMaire (@cl), netnerds.net

Export-DbaPfDataCollectorSetTemplate View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Exports Windows Performance Monitor Data Collector Set configurations as reusable XML templates. Description Exports Data Collector Set configurations from Windows Performance Monitor as XML template files that can be imported on other SQL Server hosts. This allows you to standardize performance monitoring across your SQL Server environment by saving custom counter collections, sampling intervals, and output settings as portable templates.

Read more

Get-DbaCpuUsage

Chrissy LeMaire (@cl), netnerds.net

Get-DbaCpuUsage View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Correlates SQL Server processes with Windows threads to identify which queries are consuming CPU resources Description When CPU usage is high on your SQL Server, it can be difficult to pinpoint which specific SQL queries or processes are responsible using standard SQL Server tools alone. This function bridges that gap by correlating SQL Server process IDs (SPIDs) with Windows kernel process IDs (KPIDs) through system DMVs and Windows performance counters.

Read more

Get-DbaExecutionPlan

Chrissy LeMaire (@cl), netnerds.net

Get-DbaExecutionPlan View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Retrieves cached execution plans and metadata from SQL Server’s plan cache Description Retrieves execution plans from SQL Server’s plan cache using Dynamic Management Views (sys.dm_exec_query_stats, sys.dm_exec_query_plan, and sys.dm_exec_text_query_plan). This is essential for performance analysis because it shows you what queries are actually running and how SQL Server is executing them, without having to capture plans in real-time. The function returns detailed metadata including database name, object name, creation time, last execution time, query and plan handles, plus the actual XML execution plans.

Read more

Get-DbaPfAvailableCounter

Chrissy LeMaire (@cl), netnerds.net

Get-DbaPfAvailableCounter View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Retrieves all Windows performance counters available on local or remote machines for monitoring setup. Description Retrieves all Windows performance counters available on specified machines by reading directly from the registry for fast enumeration. This is essential when setting up SQL Server monitoring because you need to know which specific counters are available before configuring data collectors or performance monitoring solutions.

Read more

Get-DbaPfDataCollector

Chrissy LeMaire (@cl), netnerds.net

Get-DbaPfDataCollector View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Retrieves Windows Performance Monitor data collectors and their configuration details from local or remote computers. Description Retrieves detailed information about Windows Performance Monitor data collectors within collector sets, commonly used by DBAs to monitor SQL Server performance counters. This function parses the XML configuration of existing data collectors to show their settings, file locations, sample intervals, and the specific performance counters they collect.

Read more

Get-DbaPfDataCollectorCounter

Chrissy LeMaire (@cl), netnerds.net

Get-DbaPfDataCollectorCounter View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Retrieves performance counter configurations from Windows Performance Monitor Data Collector Sets. Description Retrieves the list of performance counters that are configured within Windows Performance Monitor Data Collector Sets. This is useful for auditing performance monitoring configurations, verifying which SQL Server and system counters are being collected, and understanding your performance data collection setup. The function extracts counter details from existing Data Collector objects, showing you exactly which performance metrics are being tracked for troubleshooting and capacity planning.

Read more

Get-DbaPfDataCollectorCounterSample

Chrissy LeMaire (@cl), netnerds.net

Get-DbaPfDataCollectorCounterSample View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Retrieves real-time performance counter samples from SQL Server systems for monitoring and troubleshooting. Description Collects performance counter data from Windows Performance Monitor collector sets and individual counters on SQL Server systems. This function wraps PowerShell’s Get-Counter cmdlet to provide structured performance data that DBAs use for monitoring CPU, memory, disk I/O, and SQL Server-specific metrics. You can capture single snapshots for quick checks or continuous samples for ongoing monitoring during troubleshooting sessions.

Read more

Get-DbaPfDataCollectorSet

Chrissy LeMaire (@cl), netnerds.net

Get-DbaPfDataCollectorSet View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Retrieves Windows Performance Monitor Data Collector Sets and their configuration details. Description Retrieves detailed information about Windows Performance Monitor Data Collector Sets, which are used to collect performance counters for SQL Server monitoring and troubleshooting. Data Collector Sets define what performance counters to collect, when to collect them, and where to store the collected data. This function helps DBAs inventory existing collector sets, check their status (running, stopped, scheduled), and review their configuration including output locations and schedules.

Read more

Get-DbaPfDataCollectorSetTemplate

Chrissy LeMaire (@cl), netnerds.net

Get-DbaPfDataCollectorSetTemplate View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Retrieves Windows Performance Monitor templates designed for SQL Server monitoring and troubleshooting. Description Retrieves information about predefined Windows Performance Monitor (PerfMon) templates specifically created for SQL Server performance analysis. These templates include counter sets for monitoring long-running queries, PAL (Performance Analysis of Logs) configurations for different SQL Server versions, and other SQL Server-focused performance scenarios. The function parses XML template files and returns details like template names, descriptions, sources, and file paths.

Read more
← Previous
1 2
Next →
Page 1 of 2