FIX: Error may occur when setting the SQL Server Agent job history log

Symptoms

Assume that the Microsoft SQL Server Agent is enabled within a SQL Server instance on a Linux installation. When you try to set or change the maximum number of rows for the job history log and the maximum number of job history rows per job, the following error may occur:

Msg 0, Level 11, State 0, Line <LineNumber>
A severe error occurred on the current command. The results, if any, should be discarded.

Resolution

Two new SQL Server Agent properties, sqlagent.jobhistorymaxrows and sqlagent.jobhistorymaxrowsperjob, have been added to the mssql-conf configuration utility. These settings allow you to set the maximum number of rows for the job history log and the maximum number of job history rows per job, respectively.

Example:
sudo /opt/mssql/bin/mssql-conf set sqlagent.jobhistorymaxrows 1000
sudo /opt/mssql/bin/mssql-conf set sqlagent.jobhistorymaxrowsperjob 100

Note

The two properties can't be configured by using SQL Server Management Studio (SSMS).

This problem is fixed in the following cumulative updates for SQL Server:

About cumulative updates for SQL Server

Each new cumulative update for SQL Server contains all the hotfixes and security fixes that were in the previous build. We recommend that you install the latest build for your version of SQL Server:

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

References

Learn about the terminology that Microsoft uses to describe software updates.