Thor Logo dbatools

TraceFlag

Disable-DbaTraceFlag

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

Disable-DbaTraceFlag View Source Garry Bargsley (@gbargsley), blog.garrybargsley.com Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Disables globally running trace flags on SQL Server instances Description Turns off trace flags that are currently enabled globally across SQL Server instances using DBCC TRACEOFF. Useful when you need to disable diagnostic trace flags that were enabled for troubleshooting or testing without requiring a restart.

Read more

Enable-DbaTraceFlag

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

Enable-DbaTraceFlag View Source Garry Bargsley (@gbargsley), blog.garrybargsley.com Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Enables one or more trace flags globally on SQL Server instances Description Activates trace flags at the global level using DBCC TRACEON, affecting all connections and sessions on the target SQL Server instances. Commonly used for troubleshooting performance issues, enabling specific SQL Server behaviors, or applying recommended trace flags for your environment.

Read more

Get-DbaTraceFlag

Kevin Bullen (@sqlpadawan)

Get-DbaTraceFlag View Source Kevin Bullen (@sqlpadawan) Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves currently enabled global trace flags from SQL Server instances. Description Queries SQL Server instances to identify which global trace flags are currently active, returning detailed status information for monitoring and compliance purposes. This is essential for auditing server configurations, troubleshooting performance issues, and ensuring trace flag consistency across environments.

Read more