Home
%3CLINGO-SUB%20id%3D%22lingo-sub-1075318%22%20slang%3D%22en-US%22%3EApplying%20SQL%20Server%202017%20CU18%20on%20secondary%20replica%20running%20on%20Linux%20OS%20may%20fail%20with%20script%20failure%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1075318%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20SQL%20Server%202017%20is%20running%20on%20Linux%20operating%20system%20and%20if%20you%20have%20databases%20configured%20using%20Always%20ON%20feature%2C%20post-applying%20CU18%2C%20on%20secondary%20replica%20the%20script%20upgrade%20may%20fail%20with%20following%20error.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E2019-12-11%2020%3A06%3A32.46%20spid28s%20%20%20%20%20CHECKDB%20for%20database%20'DB1'%20finished%20without%20errors%20on%202019-05-16%2014%3A44%3A20.880%20(local%20time).%20This%20is%20an%20informational%20message%20only%3B%20no%20user%20action%20is%20required.%0A%0A2019-12-11%2020%3A06%3A32.48%20spid6s%20%20%20%20%20%20Upgrading%20subscription%20settings%20and%20system%20objects%20in%20database%20%5BDB1%5D.%0A%0A2019-12-11%2020%3A06%3A32.82%20spid6s%20%20%20%20%20%20Failed%20to%20update%20database%20%22DB1%22%20because%20the%20database%20is%20read-only.%0A%0A2019-12-11%2020%3A06%3A32.82%20spid6s%20%20%20%20%20%20Error%20executing%20sp_vupgrade_replication.%0A%0A2019-12-11%2020%3A06%3A32.82%20spid6s%20%20%20%20%20%20Saving%20upgrade%20script%20status%20to%20'SOFTWARE%5CMicrosoft%5CMSSQLServer%5CReplication%5CSetup'.%0A%0A2019-12-11%2020%3A06%3A32.83%20spid6s%20%20%20%20%20%20Error%20saving%20upgrade%20script%20status.%0A%0A2019-12-11%2020%3A06%3A32.83%20spid6s%20%20%20%20%20%20Database%20'master'%20is%20upgrading%20script%20'upgrade_ucp_cmdw_discovery.sql'%20from%20level%20234884100%20to%20level%20234884281.%0A%0A2019-12-11%2020%3A06%3A33.17%20spid6s%20%20%20%20%20%20Database%20'master'%20is%20upgrading%20script%20'msdb110_upgrade.sql'%20from%20level%20234884100%20to%20level%20234884281.%0A%0A2019-12-11%2020%3A06%3A33.17%20spid6s%20%20%20%20%20%20----------------------------------%0A%0A2019-12-11%2020%3A06%3A33.17%20spid6s%20%20%20%20%20%20Starting%20execution%20of%20PRE_MSDB.SQL%0A%0A2019-12-11%2020%3A06%3A33.18%20spid6s%20%20%20%20%20%20----------------------------------%0A%0A2019-12-11%2020%3A06%3A33.35%20spid6s%20%20%20%20%20%20Error%3A%203930%2C%20Severity%3A%2016%2C%20State%3A%201.%0A%0A2019-12-11%2020%3A06%3A33.35%20spid6s%20%20%20%20%20%20The%20current%20transaction%20cannot%20be%20committed%20and%20cannot%20support%20operations%20that%20write%20to%20the%20log%20file.%20Roll%20back%20the%20transaction.%0A%0A2019-12-11%2020%3A06%3A33.36%20spid6s%20%20%20%20%20%20Error%3A%20912%2C%20Severity%3A%2021%2C%20State%3A%202.%0A%0A2019-12-11%2020%3A06%3A33.36%20spid6s%20%20%20%20%20%20Script%20level%20upgrade%20for%20database%20'master'%20failed%20because%20upgrade%20step%20'msdb110_upgrade.sql'%20encountered%20error%203930%2C%20state%201%2C%20severity%2016.%20This%20is%20a%20serious%20error%20condition%20which%20might%20interfere%20with%20regular%20operation%20and%20the%20database%20will%20be%20taken%20offline.%20If%20the%20error%20happened%20during%20upgrade%20of%20the%20'master'%20database%2C%20it%20will%20prevent%20the%20entire%20SQL%20Server%20instance%20from%20starting.%20Examine%20the%20previous%20errorlog%20entries%20for%20errors%2C%20take%20the%20appropriate%20corrective%20actions%20and%20re-start%20the%20database%20so%20that%20the%20script%20upgrade%20steps%20run%20to%20completion.%0A%0A2019-12-11%2020%3A06%3A33.39%20spid6s%20%20%20%20%20%20Error%3A%203417%2C%20Severity%3A%2021%2C%20State%3A%203.%0A%0A2019-12-11%2020%3A06%3A33.39%20spid6s%20%20%20%20%20%20Cannot%20recover%20the%20master%20database.%20SQL%20Server%20is%20unable%20to%20run.%20Restore%20master%20from%20a%20full%20backup%2C%20repair%20it%2C%20or%20rebuild%20it.%20For%20more%20information%20about%20how%20to%20rebuild%20the%20master%20database%2C%20see%20SQL%20Server%20Books%20Online.%0A%0A2019-12-11%2020%3A06%3A33.40%20spid6s%20%20%20%20%20%20SQL%20Trace%20was%20stopped%20due%20to%20server%20shutdown.%20Trace%20ID%20%3D%20'1'.%20This%20is%20an%20informational%20message%20only%3B%20no%20user%20action%20is%20required.%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20a%20workaround%2C%20you%20can%20go%20to%20availability%20replica%20properties%2C%20set%20the%20seeding%20mode%20to%20Manual%2C%20and%20restart%20the%20SQL%20Server%20service%20will%20fix%20the%20issue.%26nbsp%3B%20SQL%20Server%20engineering%20team%20is%20aware%20of%20this%20issue%20and%20working%20on%20permanent%20solution.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1075318%22%20slang%3D%22en-US%22%3E%3CP%3EIf%20SQL%20Server%202017%20is%20running%20on%20Linux%20operating%20system%20and%20if%20you%20have%20databases%20configured%20using%20Always%20ON%20feature%2C%20post-applying%20CU18%2C%20on%20secondary%20replica%20the%20script%20upgrade%20error%20may%20occur.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1075318%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EHigh%20Availability%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELinux%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Esql%202017%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

 

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.