Centos – SQL Server 2017 on Linux in script upgrade mode after update

centossql server

I have MS SQL Server 2017 running on CentOS for several months without a problem. Three days ago I applied yum update that included update for mssql-server as well. and ever since I can't connect to the server, getting the following error:

Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login failed for user 'sa'. Reason: Server is in script upgrade mode. Only administrator can connect at this time..

Most of the recommendations are to wait until script updates finish; but I waited for 3 days. Also restarted the service and restarted the box.

Best Answer

Check the Release Notes for SQL Server on Linux page. Microsoft's aware of the issue, and they write:

Known upgrade issue - When you upgrade from a previous release to CU5, SQL Server might fail to start with the following error:

Error: 4860, Severity: 16, State: 1.
Cannot bulk load. The file "C:\Install\SqlTraceCollect.dtsx" does not exist or you don't have file access rights.
Error: 912, Severity: 21, State: 2.
Script level upgrade for database 'master' failed because upgrade step 'msdb110_upgrade.sql' encountered error 200, state

To resolve this error, enable SQL Server Agent and restart SQL Server with the following commands:

sudo /opt/mssql/bin/mssql-conf set sqlagent.enabled true
sudo systemctl start mssql-server
Related Topic