# Setting Trace Flags and Configuring SQL Server Containers

DevFeed: [Setting Trace Flags and Configuring SQL Server Containers](<https://devfeed.tech/articles/setting-trace-flags-and-configuring-sql-server-containers-17534.md>)

Original publisher: [Read original article](<https://www.nocentino.com/posts/2021-09-12-configuring-sql-server-in-containers/>)

Author: Anthony Nocentino

Published: 2021-09-12T11:24:45Z

Content type: tutorial

Language: en

Sources: [Kubernetes on Anthony Nocentino's Blog](<https://devfeed.tech/sources/kubernetes-on-anthony-nocentino-s-blog.md>)

Topics: [sql-server](<https://devfeed.tech/topics/sql-server.md>), [Docker](<https://devfeed.tech/topics/docker.md>), [Containers](<https://devfeed.tech/topics/containers.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [command-line](<https://devfeed.tech/tags/command-line.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [containers](<https://devfeed.tech/tags/containers.md>), [docker](<https://devfeed.tech/tags/docker.md>), [examples](<https://devfeed.tech/tags/examples.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [sql](<https://devfeed.tech/tags/sql.md>), [sql-server](<https://devfeed.tech/tags/sql-server.md>), [trace](<https://devfeed.tech/tags/trace.md>), [volume](<https://devfeed.tech/tags/volume.md>)

## AI overview

A tutorial on configuring SQL Server in Docker containers. It demonstrates setting trace flags through container startup parameters and configuring SQL Server with an injected mssql.conf file, while explaining how configuration and data persistence relate to the container lifecycle.

## Source excerpt

In this blog post, we will walk through a few examples of how to configure SQL Server in Docker Containers. First, we will configure a container at runtime by overriding the default docker command for the container and setting Database Engine Service Startup Options. Second, we're going to inject a configuration file into our container to configure SQL Server. Let's go! Starting a Container with a Trace Flag First up, let's configure a container at runtime using Database Engine Service Startup Options. In Docker you can override the command of a container at the command line so we can start up a container with the correct executable and parameters. I'm configuring a trace flag by setting the correct parameters for the sqlservr executable. So when this container starts up it will start the sqlservr executable with the -T 3226 parameter. Let's check out the code for this...