SQL Server Configuration Manager for Linux

By:   |   Comments (2)   |   Related: > SQL Server on Linux


Problem

Microsoft has released SQL Server to run on Linux. As a DBA, you must be familiar with SQL Server Configuration Manager for Windows. In this tip we will explore the SQL Server Configuration Manager for Linux and how to make use of it.

Solution

SQL Server Configuration Manager for Windows is a graphical tool to manage the services associated with SQL Server, to configure the network protocols used by SQL Server, and to manage the network connectivity configuration from SQL Server client computers. We can also use the SQL Server Configuration Manager to start, pause, resume, or stop the services, to view service properties, or to change service properties.

In comparison, SQL Server Configuration Manager for Linux is not a graphical interface tool. For SQL Server on Linux, mssql-conf is the corresponding tool for SQL Server on Linux (Red Hat Enterprise Linux, SUSE Linux Enterprise server and Ubuntu).

To get more information about the mssql-conf tool, run the following command:

#Syntax to check information about mssql-conf tool.

sudo /opt/mssql/bin/mssql-conf -h

Syntax to check information about mssql-conf tool

This command gives us various options that we can use with the mssql-conf tool.

We will review each option to get more details and begin learning about the tool.

mssql-conf list

We can configure multiple parameters using the mssql-conf tool. This option provides a list of supported configuration settings.

# Syntax to list options for the mssql-conf tool.

/opt/mssql/bin/mssql-conf list

Syntax to list options for the mssql-conf tool

We can see there that it supports below operations.

  • tcpport: Change the port where SQL Server will listen for connections.
  • defaultdatadir (Default data directory): Change the directory where the new SQL Server database data files (.mdf) are created.
  • defaultlogdir (Default log directory): Changes the directory where the new SQL Server database log (.ldf) files are created.
  • defaultdumpdir (Default dump directory): Change the directory where SQL Server will deposit memory dumps and other troubleshooting files by default.
  • defaultbackupdir (Default backup directory): Change the directory where SQL Server will send the backup files by default.

mssql-conf set

This sets a new value of a SQL Server settings i.e. TCP port, default data directory, default log directory, default backup directory, etc. For example, if we want to configure SQL Server to use port 5500 we need to execute the following statement:

mssql-conf set tcpport 5500

mssql-conf unset

We can reset the original values of SQL Server setting using the unset parameter. For example, to reset the SQL Server port to default values 1433, use the below code:

mssql-conf  unset tcpport

mssql-conf traceflags

We can set the traceflags that the SQL Server service will use globally. For example, if we want to run the traceflag 1204 globally, run the below code:

sudo /opt/mssql/bin/mssql-conf traceflag 1204 on

mssql-conf set-sa-password

We can reset the sa password using this parameter. To reset the sa password, run the below code and restart the SQL Server services.

sudo /opt/mssql/bin/mssql-conf set-sa-password 'newpassword'

mssql-conf set-collation

We can set the collation for SQL Server on Linux. Suppose we want to set the server collation to Latin1_General_CS_AS, so we need to run the below code and restart the services.

sudo /opt/mssql/bin/mssql-conf Latin1_General_CS_AS

mssql-conf validate

This validates the configuration file and removes settings that are not acceptable.  Below is the code to do so:

sudo /opt/mssql/bin/mssql-conf validate

mssql-conf accept-eula

This command accepts the license terms for SQL Server on Linux.

The mssql-conf tool creates a configuration file to store the user specified configuration changes.  These configurations are stored in the mssql.conf config file located at /var/opt/mssql. During SQL Server startup the customized values and parameters are read from this config file and then applied to SQL Server.

We will explore more about mssql.conf file and using different options for mssql-conf in future tips.

Next Steps
  • Explore SQL Server Configuration manager in Linux as this is required to perform day to day operations.
  • Wait for my next tips to see how to do configuration changes using mssql-conf.
  • Read more about SQL Server on Linux Tips.


sql server categories

sql server webinars

subscribe to mssqltips

sql server tutorials

sql server white papers

next tip



About the author
MSSQLTips author Rajendra Gupta Rajendra Gupta is a Consultant DBA with 14+ years of extensive experience in database administration including large critical OLAP, OLTP, Reporting and SharePoint databases.

This author pledges the content of this article is based on professional experience and not AI generated.

View all my tips



Comments For This Article




Wednesday, September 22, 2021 - 2:51:51 PM - Michael Irwin Back To Top (89253)
I have installed SQL Server for Linux 2019 on a Ubunto 20.04 system. I am unable to set the SA password. For example, taking the instructions here:
$ sudo /opt/mssql/bin/mssql-conf set-sa-password 'newpassword'
$ sudo /opt/mssql/bin/mssql-conf set-sa-password 'QWer!@34'
$ sudo /opt/mssql/bin/mssql-conf set-sa-password '31415@@##ABCde'

all result in a response like this for the last one. "mssql-conf: error: unrecognized arguments: 31415@@##ABCde",

Using
$ sudo /opt/mssql/bin/mssql-conf setup
with any of a variety of apparently compliant passwords (8+ chars, including digits, symbols, upper, lower) also always fails:
[sudo] password for username:
Sorry, try again.



Wednesday, April 10, 2019 - 7:07:03 AM - Dierk Back To Top (79514)

hi,

how can I activate filestream in the Linux version of MSSql

thanks

dierk 















get free sql tips
agree to terms