Sql-server – Is it possible to change the SQL Server errorlog file number on Linux

linuxsql server

Everything is in the title. We can change the number of errorlog files using the registry on Windows, does anybody know if it is possible on Linux? I see no mssql-conf option for this.

Thanks

Best Answer

This is not possible at the moment, even on CTP 3.1 of SQL Server 2019 as I write this.

As you've discovered, it requires changing a registry setting, and trying to run xp_instance_regwrite results in the following error:

Msg 0, Level 11, State 0, Line 0

A severe error occurred on the current command. The results, if any, should be discarded.

Bob Ward's book Pro SQL Server on Linux doesn't mention anything either. It refers to filelocation.errorlogfile for setting the path using mssql-conf, but not the number of files.

If I were to hazard a guess, this will eventually find its way into the product, but it is not there now.