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
- 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.
- Let’s run the mssql-conf utility with validate option. It
Syntax: /opt/mssql/bin/mssql-conf validate
- 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
- Read the mssql.conf configuration file
Syntax: cat mssql.conf
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.