database master always in urecoverable state after CU

2022-08-01T08:51:53.653+00:00

We have SQL Server 2017 and two SQL Server 2019 where we already tried to apply several CU versions (SQL Server 2017 RTM CU (KB5014553), Security Update for SQL Server 2017 RTM GDR (KB5014354), Security Update for SQL Server 2019 RTM CU (KB5014353) and others (like previous CUs) but it always fails to update on this three machines . After failed Update the Server Wizard simply states "Cannot recover the master database. SQL Server is unable to run." and the indexing/search service components fail too

I also tried taskill all sql related services I could think off before applying the CU, but this resulted in the same error.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,777 questions
SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,460 questions
0 comments No comments
{count} votes

6 answers

Sort by: Most helpful
  1. Erland Sommarskog 101.4K Reputation points MVP
    2022-08-01T09:45:01.577+00:00

    This is usually due to the dreaded msdb110_upgrade.sql script. This is a script they run on all upgrades. There are plentiful of issues in this script that can cause it to fail on servers where there is something "unusual".

    Would it be possible to share the SQL Server errorlog for any of these servers? That should be the log file you get when applying the CU?

    0 comments No comments

  2. CathyJi-MSFT 21,096 Reputation points Microsoft Vendor
    2022-08-02T02:31:51.777+00:00

    Hi @Dennis Brennenstuhl | Softwarekontor GmbH ,

    Please using select @@version to check your SQL server version, then choose the correct latest package to SQL server. Latest CU or latest GDR? The General Distribution Release (GDR) and Cumulative Update (CU) designations correspond to the two different servicing options in place for SQL Server baseline releases. A baseline can be either an RTM release or a Service Pack release.

    • GDR updates – cumulatively only contain security updates for the given baseline.
    • CU updates – cumulatively contain all functional fixes and security updates for the given baseline.

    For any given baseline, either the GDR or CU updates could be options (see below).
    • If SQL Server installation is at a baseline version, you can choose either the GDR or CU update.
    • If SQL Server installation has intentionally only installed past GDR updates, then choose to install the GDR update package.
    • If SQL Server installation has intentionally installed previous CU updates, then choose to install the CU security update package.

    In addition, the latest CU for SQL 2017 is CU30(KB5013756), the latest GDR for SQL 2017 is KB5014354. The latest GDR for SQL 2019 is KB5014356, the latest CU for SQL 2019 is CU16 (KB5011644).

    If you could not make a choice, you can share us the result of select @@version.

    If the installation is still failed, please share us the SQL server log for analysis.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments

  3. 2022-08-02T09:16:33.977+00:00

    thanks for the valuable tips provided already!
    Since the servers are Hyper-V's I just rolled back to the snapshot I made right before I attempted the update and have currently no error logs to show.
    I will try a new attempt on friday however and will be able to provide logs if it does fail again.

    (1st) 2019 is :
    Microsoft SQL Server 2019 (RTM) - 15.0.2000.5 (X64)
    Sep 24 2019 13:48:23
    Copyright (C) 2019 Microsoft Corporation
    Standard Edition (64-bit) on Windows Server 2019 Standard 10.0 <X64> (Build 17763: ) (Hypervisor)

    (2nd) 2019 is:
    Microsoft SQL Server 2019 (RTM-CU15) (KB5008996) - 15.0.4198.2 (X64)
    Jan 12 2022 22:30:08
    Copyright (C) 2019 Microsoft Corporation
    Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2019 Standard 10.0 <X64> (Build 17763: ) (Hypervisor)

    the 2017 is:
    Microsoft SQL Server 2017 (RTM-GDR) (KB4505224) - 14.0.2027.2 (X64)
    Jun 15 2019 00:26:19
    Copyright (C) 2017 Microsoft Corporation
    Enterprise Edition (64-bit) on Windows Server 2019 Standard 10.0 <X64> (Build 17763: ) (Hypervisor)

    0 comments No comments

  4. CathyJi-MSFT 21,096 Reputation points Microsoft Vendor
    2022-08-03T06:36:43.03+00:00

    Hi @Dennis Brennenstuhl | Softwarekontor GmbH ,

    For SQL server 2019 RTM(15.0.2000.5), please apply the latest CU 16 for SQL 2019.

    For SQL server 2019 (RTM-CU15) (KB5008996), please also apply the latest CU 16 for this instance.

    For SQL server 2017 (RTM-GDR) (KB4505224), please apply the latest GDR(4505224) for this instance.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


  5. 2022-08-12T13:42:21.797+00:00

    Hi everyone - I wasn't able to provide feedback earlier.

    SQL 2019 Server worked like a charme with the new CU17 (as linked by Cathyji-msft)

    Unfortunatly, SQL 2017 failed Database Engine Service (with the Link provided for 2017 SQL):

    Action required:
    Use the following information to resolve the error, uninstall this feature, and then run the setup process again.

    Feature failure reason:
    An error occurred during the setup process of the feature.

    Error details:
    § Error installing SQL Server Database Engine Services Instance Features
    Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.
    Error code: 0x851A001A
    Visithttps://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=14.0.2042.3&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4026 to get help on troubleshooting.

    ---
    that link sends me to nowhere :)

    from Log:

    Overall summary:
    Final result: The patch installer has failed to update the following instance: MSSQLSERVER. To determine the reason for failure, review the log files.
    Exit code (Decimal): -2061893606
    Start time: 2022-08-12 15:12:14
    End time: 2022-08-12 15:27:37
    Requested action: Patch

    Instance MSSQLSERVER overall summary:
    Final result: The patch installer has failed to update the shared features. To determine the reason for failure, review the log files.
    Exit code (Decimal): -2061893606
    Start time: 2022-08-12 15:24:43
    End time: 2022-08-12 15:27:32
    Requested action: Patch

    -------------

    from Event Viewer:

    MSSQLSERVER / EventID 912:

    Script level upgrade for database 'master' failed because upgrade step 'ISServer_upgrade.sql' encountered error 6528, 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.

    --------------

    and then:

    MSSQLSERVER / EventID 3417:

    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.