Validate the configuration of SQL Server on Linux

The mssql-conf tool validates multiple configuration options for SQL Server on Linux. When you run the mssql-conf utility with validate parameter, the 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 the location /var/opt/mssql.

By default, this tool does not create the mssql.conf file after installation of SQL Server on Linux, It creates this file only when any of the configuration parameters is used or when you run the validate parameter.

  • Connect your Linux machine as a root user

Syntax: sudo -i

01connectasrootuser

  • Verify that you have mssql.conf file at the location /var/opt/mssql/. If you don’t have, you can follow next step to generate it. In my case, I have changed a couple of configurations of SQL Server by setting up ‘default log folder’, ‘default data folder’ and ‘default backup directory’ so the mssql.conf file does exist at the location.

01mssql-conffilelocation

  • Let’s run the mssql-conf utility with validate option. It 

Syntax: /opt/mssql/bin/mssql-conf validate

02runvalidation

  • You can verify the mssql.conf file creation time. In my case, the file creation time has been changed that confirms it has been recreated after validating SQL Server

03reverifymssqlconfigtiming

  • Read the mssql.conf configuration file

Syntaxcat mssql.conf

04readmssql-conffile

The mssql.conf contains only those information which you as a user have changed on SQL Server on Linux. As I mentioned that I changed ‘default log folder’, ‘default data folder’ and ‘default backup directory’ settings of SQL Server, the mssql.conf shows those modified detail in the above output.

Leave a comment

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