dbatools is a free PowerShell module with over 200 SQL Server administration, best practice and migration commands included.

Please note that documentation and command names may be out of date while we work furiously towards 1.0


Disable-DbaTraceFlag

The function will disable a Trace Flag that is currently running globally on the SQL Server instance(s) listed.

Screenshots

dbatools-Disable-DbaTraceFlag

Examples

Disable the globally running trace flag 3226 on SQL Server instance sql2016.

Disable-DbaTraceFlag -SqlInstance sql2016 -TraceFlag 3226

Author

This command was created by Garry Bargsley. You can find Garry on Twitter and his blog.

Get-Help

From PowerShell, execute Get-Help Disable-DbaTraceFlag -Detailed for more information on this function.

Source Code

Want to see the source code? View Disable-DbaTraceFlag.ps1 on GitHub
 

Related commands