Applying SQL Server 2017 CU18 on secondary replica running on Linux OS may fail with script failure
Published Dec 19 2019 04:31 PM 1,798 Views

 

If SQL Server 2017 is running on Linux operating system and if you have databases configured using Always ON feature, post-applying CU18, on secondary replica the script upgrade may fail with following error.

 

 

 

2019-12-11 20:06:32.46 spid28s     CHECKDB for database 'DB1' finished without errors on 2019-05-16 14:44:20.880 (local time). This is an informational message only; no user action is required.

2019-12-11 20:06:32.48 spid6s      Upgrading subscription settings and system objects in database [DB1].

2019-12-11 20:06:32.82 spid6s      Failed to update database "DB1" because the database is read-only.

2019-12-11 20:06:32.82 spid6s      Error executing sp_vupgrade_replication.

2019-12-11 20:06:32.82 spid6s      Saving upgrade script status to 'SOFTWARE\Microsoft\MSSQLServer\Replication\Setup'.

2019-12-11 20:06:32.83 spid6s      Error saving upgrade script status.

2019-12-11 20:06:32.83 spid6s      Database 'master' is upgrading script 'upgrade_ucp_cmdw_discovery.sql' from level 234884100 to level 234884281.

2019-12-11 20:06:33.17 spid6s      Database 'master' is upgrading script 'msdb110_upgrade.sql' from level 234884100 to level 234884281.

2019-12-11 20:06:33.17 spid6s      ----------------------------------

2019-12-11 20:06:33.17 spid6s      Starting execution of PRE_MSDB.SQL

2019-12-11 20:06:33.18 spid6s      ----------------------------------

2019-12-11 20:06:33.35 spid6s      Error: 3930, Severity: 16, State: 1.

2019-12-11 20:06:33.35 spid6s      The current transaction cannot be committed and cannot support operations that write to the log file. Roll back the transaction.

2019-12-11 20:06:33.36 spid6s      Error: 912, Severity: 21, State: 2.

2019-12-11 20:06:33.36 spid6s      Script level upgrade for database 'master' failed because upgrade step 'msdb110_upgrade.sql' encountered error 3930, state 1, severity 16. This is a serious error condition which might interfere with regular operation and the database will be taken offline. If the error happened during upgrade of the 'master' database, it will prevent the entire SQL Server instance from starting. Examine the previous errorlog entries for errors, take the appropriate corrective actions and re-start the database so that the script upgrade steps run to completion.

2019-12-11 20:06:33.39 spid6s      Error: 3417, Severity: 21, State: 3.

2019-12-11 20:06:33.39 spid6s      Cannot recover the master database. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it. For more information about how to rebuild the master database, see SQL Server Books Online.

2019-12-11 20:06:33.40 spid6s      SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.

 

 

 

As a workaround, you can go to availability replica properties, set the seeding mode to Manual, and restart the SQL Server service will fix the issue.  SQL Server engineering team is aware of this issue and working on permanent solution.

Version history
Last update:
‎Dec 19 2019 04:34 PM
Updated by: