question

KennethWalker-2818 avatar image
0 Votes"
KennethWalker-2818 asked ErlandSommarskog answered

Unable to set SQL Server Agent Properties

Environment:
SQL Server 2019 CU10 on RHEL 8.4

Issue:
When trying to set the History property of Maximum job history log size (in rows), either through SSMS or direct "EXEC msdb.dbo.sp_set_sqlagent_properties @jobhistory_max_rows=5000", the server returns an error:

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

and the property is never set.

I have checked to make sure that mssql user and group are applied to /var/opt/mssql and below (including .system)

I have run the sp both as a regular user and sa with no difference.

The properties can be "read" correctly, just not set. so it appears the "registry" is working ok (or I am getting default values).

Anyone else see this issue or know how to fix it?

Thanks,
Ken

sql-server-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ErlandSommarskog avatar image
0 Votes"
ErlandSommarskog answered

I tried the command on a VM running Ubuntu, and I got the same result.

The error message is basically an "internal error" message. Since the severity is 11, it indicates that the accident occurred in the client, that is, SSMS. However, it many cases, these internal errors are due to SQL Server spewing out incorrect TDS.

I could not see anything in the SQL Server errorlog.

You can report SQL Server bugs on https://feedback.azure.com/forums/908035-sql-server.

If this is a blocking issue for you, and you need a fix, you will need to open a support case.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

KennethWalker-2818 avatar image
0 Votes"
KennethWalker-2818 answered ErlandSommarskog commented

OK, thanks for the feedback.

I also just tried it from sqlcmd on the server. It did not give me an error, however it did not update the field either.

I will open a support case then.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Yeah, I also tried SQLCMD with the same result. Sometimes when things like this happen, trying SQLCMD can give some hints, like a different error message. But this time it was just silent.

Good luck with the case! The outcome could be that it is not meant to work - but that the error behaviour is poor.

0 Votes 0 ·

By the way, if you have the time, please report back the outcome of the case!

0 Votes 0 ·
ErlandSommarskog avatar image
0 Votes"
ErlandSommarskog answered

I spoke with a contact at Microsoft, and I got confirmed what I suspected. It is simply not supported to set Agent properties on Linux.

The error message is still a bug in my opinion.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.