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.
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.
- Open SQL Server Configuration Manager (as Administrator).
- Open Properties of the SQL Server instance you want to configure.
- 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.
- Notice that additional parameter was added to the parameters list. Click Apply button.
- You will get the warning that SQL Server instance needs to be restarted in order the change takes effect.
- Finally, you have to restart your SQL Server instance.