QuickQuestion: How to enable a trace flag on SQL Server startup?

QuickQuestion series is a series of short posts in which I answer database related questions asked by my colleagues, friends, and co-workers, mainly application developers.

Today’s question:

How to enable a trace flag on SQL Server startup?

If you want to have a certain Trace Flag enabled after every SQL Server startup, then you have to set it as one of SQL Server startup parameters. To do that you need to execute few simple steps.

  1. Open SQL Server Configuration Manager (as Administrator).
    TraceFlag - SQLServer Configuration Manager
  2. Open Properties of the SQL Server instance you want to configure.
    TraceFlag - SQLServer Configuration Manager - properties 1
  3. As a next step, go to Startup Parameters tab. Provide new startup parameter. For Trace Flag it will be -T#### (where #### needs to be replaced with Trace Flag number). Click Add button.
    TraceFlag - SQLServer Configuration Manager - startup parameters
  4. Notice that additional parameter was added to the parameters list. Click Apply button.
    TraceFlag - SQLServer Configuration Manager - startup parameters 2
  5. You will get the warning that SQL Server instance needs to be restarted in order the change takes effect.
    TraceFlag - SQLServer Configuration Manager - startup parameters 3
  6. Finally, you have to restart your SQL Server instance.
    TraceFlag - SQLServer Configuration Manager - restart

That’s it.

-Marek

Share it:
Facebooktwittergoogle_plusredditpinterestlinkedintumblrmailFacebooktwittergoogle_plusredditpinterestlinkedintumblrmail

Leave a Reply

Your email address will not be published. Required fields are marked *