3

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.

Felix
  • 543
  • 5
  • 10
  • 23

1 Answers1

4

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
Brent Ozar
  • 4,425
  • 18
  • 21
  • is it really the same problem? the service itself didn't give me any errors! In any event, ran these commands and still unable to login – Felix Apr 07 '18 at 16:20
  • @Felix your best bet is to post the error log so we can see if it's the same issue. – Brent Ozar Apr 07 '18 at 16:41
  • I am sorry - I did what you said, and tried to connect immedaitely after that. But at that time sql was *indeed* running update scripts. it took some 20 minutes, but in the end it finished successfully, and I can connect! Error log was listing the scripts as it was running them. Sorry for doubting you :) – Felix Apr 07 '18 at 16:52
  • 1
    No no, you were right to doubt me! Always good to double check and keep asking questions. Glad it worked out! – Brent Ozar Apr 07 '18 at 19:02