The mssql-conf is a configuration tool that installs with SQL Server vNext for both Red Hat Enterprise Linux and Ubuntu systems. You can think of this tool as a replacement for SQL Server Configuration Manager which exists on Windows. It allows you to initialize multiple configuration options for the SQL engine.
This tool creates a configuration file to store the configuration changes that user has specified, These configurations are stored in a config file by name mssql.conf at /var/opt/mssql. During SQL Server startup the customized values & parameters are read from this config file and are applied to SQL Server. It’s critical and necessary to make sure some incorrect/unsupported configuration options are not passed to SQL Server.
If you’re not sure what all the parameters the mssql-conf utility contains, you can run the utility with -h or –help switches. You will see a list of options that you can use with that command.
Syntax: /opt/mssql/bin/mssql-conf –help Or -h
I will start with the ‘list’ parameter, will see what all the server level supported configurable settings are part of the ‘list’ parameter and will continue to explore other parameters of the above output.
@ list
Connect your Linux machine as a root user and run the following command
Syntax: /opt/mssql/bin/mssql-conf list
It lists the supported server level configurable settings which are;
- TCP port:
You can change the TCP port of SQL Server service where it will listen for connections. To get more detail, how to change it you can refer the post – Change the TCP Port on SQL Server on Linux
- Default backup directory:
This option changes the default directory where SQL Server will send the backup files. Check out the post – Change the default backup folder location on SQL Server on Linux to get more experience on it.
- Default dump directory:
It sets the directory where SQL Server will deposit the memory dumps and other troubleshooting files by default.
- Default log directory:
It changes the directory where the new SQL Server database log (.ldf) files will reside. You can refer the post – Change the Default Data or Log Directory Location on SQL Server on Linux; it covers both the data and log file.
- Default data directory:
It changes the directory where the SQL Server new database data files (.mdf and .ndf) will reside. To explore more this, kindly refer the post – Change the Default Data or Log Directory Location on SQL Server on Linux to get more details.
@ set
It sets the new value of a SQL Server settings like TCP port, default data directory, default log directory, and many others.
@ unset
The unset parameter resets the value to the default setting value of SQL Server.
@ traceflags
It allows to enable or disable trace flag for the startup of the SQL Server service. You can refer the post – Enable or Disable Trace Flags Globally on SQL Server on Linux, it will give you a brief idea about it.
@ set-sa-password
This parameter resets the sa login password without connecting MSSQL-Tools.
@ set-collation
It set a new collation for SQL Server Instance on Linux. Check out the post – Modify the collation of SQL Server Instance on Linux for more insight.
@ validate
It validates the configuration file and removes settings that could not be validated. Follow the post – Validate the configuration of SQL Server on Linux to get more details.
@ accept-eula
It accepts the license terms for SQL Server on Linux that can be downloaded from Microsoft website.
I hope you enjoyed learning the new SQL Server Configuration Manager tool for SQL Server on Linux. Please do share your feedback regarding the tool and the post.