Unable to connect to LocalDB or update SQL Server

Anonymous
2024-06-01T23:31:04+00:00

Hello,

I am encountering several issues with SQL Server and need assistance resolving them.

Since I have a lot of content here I will first briefly summarize what I've done, and then list the details.

Attempted SQL Server Update:

  • Specific Error Handling:
    • Encountered specific Windows Update error: Security Update for SQL Server 2022 RTM GDR (KB5035432) with install error - 0x80070643.
    • Photo 1
    • Photo 2
    • ![](https://learn-attachment.microsoft.com/api/attachments/4dd18079-ba22-434d-9a96-01e778280703?platform=QnA"https://learn-attachment.microsoft.com/api/attachments/3c68dc9d-73a1-4ee4-958e-5d6edce587cc?platform=QnA" title="filestore.community.support.microsoft.com" rel="ugc nofollow">![](https://learn-attachment.microsoft.com/api/attachments/3c68dc9d-73a1-4ee4-958e-5d6edce587cc?platform=QnA"https://ibb.co/FxhyhKf" title="ibb.co" rel="ugc nofollow">Photo 1

      Photo 2

      I am unable to connect to my LocalDB instance in SQL Server. The error message I receive is:

      Unable to connect to target server '(localdb)\MSSQLLocalDB'. Please verify the connection information such as the server name, login credentials, and firewall rules for the target server.
      

      Problem 2: Errors Updating SQL Server

      When attempting to update SQL Server, I encounter the following error messages:

      The patch installer has failed to update the following instance: SQLEXPRESS SQLEXPRESS01 MSSQLSERVER. To determine the reason for failure, review the log files.
      Exit code (Decimal): -2061893565
      

      Here is a summary of the failed instances:

      • SQLEXPRESS
        • Exit code: -2061893565
      • SQLEXPRESS01
        • Exit code: -2061893565
      • MSSQLSERVER
        • Exit code: -2061893606

      Here is the overall summary:

        Final result:                  The patch installer has failed to update the following instance: SQLEXPRESS SQLEXPRESS01 MSSQLSERVER. To determine the reason for failure, review the log files.

        Exit code (Decimal):           -2061893565

        Start time:                    2024-06-01 10:14:07

        End time:                      2024-06-01 10:16:06

        Requested action:              Patch

      Instance SQLEXPRESS 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):           -2061893565

        Start time:                    2024-06-01 10:14:32

        End time:                      2024-06-01 10:15:17

        Requested action:              Patch

      Instance SQLEXPRESS01 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):           -2061893565

        Start time:                    2024-06-01 10:15:19

        End time:                      2024-06-01 10:15:32

        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:                    2024-06-01 10:15:33

        End time:                      2024-06-01 10:16:04

        Requested action:              Patch

      Machine Properties:

        Machine name:                  FRACTALG

        Machine processor count:       12

        OS version:                    Microsoft Windows 11 Home (10.0.22621)

        OS service pack:              

        OS region:                     United States

        OS language:                   English (United States)

        OS architecture:               x64

        Process architecture:          64 Bit

        OS clustered:                  No

      Product features discovered:

        Product              Instance             Instance ID                    Feature                                  Language             Edition              Version         Clustered  Configured

        SQL Server 2022      SQLEXPRESS           MSSQL16.SQLEXPRESS             Database Engine Services                 1033                 Express Edition      16.0.1000.6     No         Yes      

        SQL Server 2022      SQLEXPRESS01         MSSQL16.SQLEXPRESS01           Database Engine Services                 1033                 Express Edition      16.0.1000.6     No         Yes      

        SQL Server 2022      MSSQLSERVER          MSSQL16.MSSQLSERVER            Database Engine Services                 1033                 Express Edition      16.0.1115.1     No         Yes      

        SQL Server 2022      MSSQLSERVER          MSSQL16.MSSQLSERVER            SQL Server Replication                   1033                 Express Edition      16.0.1115.1     No         Yes      

        SQL Server 2022      MSSQLSERVER          MSSQL16.MSSQLSERVER            Full-Text and Semantic Extractions for Search 1033                 Express Edition      16.0.1000.6     No         Yes      

        SQL Server 2022      MSSQLSERVER          MSSQL16.MSSQLSERVER            Machine Learning Services and Language Extensions 1033                 Express Edition      16.0.1115.1     No         Yes      

        SQL Server 2022                                                          LocalDB                                  1033                 Express Edition      16.0.1115.1     No         Yes      

      Package properties:

        Description:                   Microsoft SQL Server 2022

        ProductName:                   SQL Server 2022

        Type:                          RTM

        Version:                       16

        SPLevel:                       0

        KBArticle:                     KB5036432

        KBArticleHyperlink:            https://support.microsoft.com/?kbid=5036432

        PatchType:                     QFE

        AssociatedHotfixBuild:         0

        Platform:                      x64

        PatchLevel:                    16.0.4125.3

        ProductVersion:                16.0.1000.6

        GDRReservedRange:              16.0.1100.0:16.0.3999.0

        Installation location:         D:\7aa0aa4a3c96d0821a0b4e\x64\setup\

      Updated product edition:

        Instance             Edition            

        SQLEXPRESS           Express            

        SQLEXPRESS01         Express            

        MSSQLSERVER          Express            

      User Input Settings:

        ACTION:                        Patch

        ALLINSTANCES:                  false

        CLUSTERPASSIVE:                false

        CONFIGURATIONFILE:            

        ENU:                           true

        HELP:                          false

        IACCEPTSQLSERVERLICENSETERMS:  true

        IACKNOWLEDGEENTCALLIMITS:      false

        INDICATEPROGRESS:              false

        INSTANCEID:                    <empty>

        INSTANCENAME:                  <empty>

        QUIET:                         false

        QUIETSIMPLE:                   false

        SUPPRESSPAIDEDITIONNOTICE:     false

        SUPPRESSPRIVACYSTATEMENTNOTICE: false

        UIMODE:                        Normal

      Rules with failures or warnings:

      Rules report file:               C:\Program Files\Microsoft SQL Server\160\Setup Bootstrap\Log\20240601_101407\SystemConfigurationCheck_Report.htm

      System Information:

      • Machine Name: FRACTALG
      • OS Version: Microsoft Windows 11 Home (10.0.22621)
      • OS Architecture: x64

      SQL Server Instances and Features:

      • SQL Server 2022 Express Edition (multiple instances)
      • LocalDB

      Steps Taken:

      1. Attempted to update SQL Server using the patch from these URLs:
      2. Ran sfc /scannow to check for system file integrity, which found no issues.

      Results:

      C:\Windows\System32>sfc /scannow

      Beginning system scan.  This process will take some time.
      
      Beginning verification phase of system scan.
      
      Verification 100% complete.
      
      Windows Resource Protection did not find any integrity violations.
      
      C:\Windows\System32&gt;
      
      1. Ran chkdsk /f /r, which completed without finding bad sectors.

      Here are the results of that operation:

      Checking file system on C:

      The type of the file system is NTFS.
      
      A disk check has been scheduled.
      
      Windows will now check the disk.                        
      
      Stage 1: Examining basic file system structure ...
      
      Cleaning up instance tags for file 0x31460.
      
      Cleaning up instance tags for file 0x39302.
      
        1548800 file records processed.                                                        
      
      File verification completed.
      
       Phase duration (File record verification): 8.99 seconds.
      
        29258 large file records processed.                                   
      
       Phase duration (Orphan file record recovery): 9.68 milliseconds.
      
        0 bad file records processed.                                     
      
       Phase duration (Bad file record checking): 0.60 milliseconds.
      
      Stage 2: Examining file name linkage ...
      
        89499 reparse records processed.                                      
      
        2129810 index entries processed.                                                       
      
      Index verification completed.
      
       Phase duration (Index verification): 28.77 seconds.
      
        0 unindexed files scanned.                                        
      
       Phase duration (Orphan reconnection): 3.51 seconds.
      
        0 unindexed files recovered to lost and found.                    
      
       Phase duration (Orphan recovery to lost and found): 831.50 milliseconds.
      
        89499 reparse records processed.                                      
      
       Phase duration (Reparse point and Object ID verification): 126.40 milliseconds.
      
      Stage 3: Examining security descriptors ...
      
      Cleaning up 4355 unused index entries from index $SII of file 0x9.
      
      Cleaning up 4355 unused index entries from index $SDH of file 0x9.
      
      Cleaning up 4355 unused security descriptors.
      
      Security descriptor verification completed.
      
       Phase duration (Security descriptor verification): 53.09 milliseconds.
      
        290506 data files processed.                                           
      
       Phase duration (Data attribute verification): 0.63 milliseconds.
      
      CHKDSK is verifying Usn Journal...
      
      Usn Journal verification completed.
      
      Stage 4: Looking for bad clusters in user file data ...
      
        1548784 files processed.                                                               
      
      File data verification completed.
      
       Phase duration (User file recovery): 8.46 minutes.
      
      Stage 5: Looking for bad, free clusters ...
      
        37466886 free clusters processed.                                                       
      
      Free space verification is complete.
      
       Phase duration (Free space recovery): 15.45 seconds.
      
      Windows has made corrections to the file system.
      
      No further action is required.
      
       487625727 KB total disk space.
      
       335420612 KB in 1106092 files.
      
          713056 KB in 290507 indexes.
      
               0 KB in bad sectors.
      
         1624511 KB in use by the system.
      
           65536 KB occupied by the log file.
      
       149867548 KB available on disk.
      
            4096 bytes in each allocation unit.
      
       121906431 total allocation units on disk.
      
        37466887 allocation units available on disk.
      
      Total duration: 9.43 minutes (565968 ms).
      
      Internal Info:
      
      00 a2 17 00 8a 3b 15 00 39 db 23 00 00 00 00 00  .....;..9.#.....
      
      fe 07 00 00 9d 55 01 00 00 00 00 00 00 00 00 00  .....U..........
      

      Results XML View:

      - &lt;Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"&gt;
      
      - &lt;System&gt;
      
        &lt;Provider Name="Microsoft-Windows-Wininit" Guid="{206f6dea-d3c5-4d10-bc72-989f03c8b84b}" EventSourceName="Wininit" /&gt;
      
        &lt;EventID Qualifiers="16384"&gt;1001&lt;/EventID&gt;
      
        &lt;Version&gt;0&lt;/Version&gt;
      
        &lt;Level&gt;4&lt;/Level&gt;
      
        &lt;Task&gt;0&lt;/Task&gt;
      
        &lt;Opcode&gt;0&lt;/Opcode&gt;
      
        &lt;Keywords&gt;0x80000000000000&lt;/Keywords&gt;
      
        &lt;TimeCreated SystemTime="2024-06-01T16:06:01.5125068Z" /&gt;
      
        &lt;EventRecordID&gt;123152&lt;/EventRecordID&gt;
      
        &lt;Correlation /&gt;
      
        &lt;Execution ProcessID="1088" ThreadID="0" /&gt;
      
        &lt;Channel&gt;Application&lt;/Channel&gt;
      
        &lt;Computer&gt;FractalG&lt;/Computer&gt;
      
        &lt;Security /&gt;
      
        &lt;/System&gt;
      
      - &lt;EventData&gt;
      
        &lt;Data&gt;Checking file system on C: The type of the file system is NTFS. A disk check has been scheduled. Windows will now check the disk. Stage 1: Examining basic file system structure ... Cleaning up instance tags for file 0x31460. Cleaning up instance tags for file 0x39302. 1548800 file records processed. File verification completed. Phase duration (File record verification): 8.99 seconds. 29258 large file records processed. Phase duration (Orphan file record recovery): 9.68 milliseconds. 0 bad file records processed. Phase duration (Bad file record checking): 0.60 milliseconds. Stage 2: Examining file name linkage ... 89499 reparse records processed. 2129810 index entries processed. Index verification completed. Phase duration (Index verification): 28.77 seconds. 0 unindexed files scanned. Phase duration (Orphan reconnection): 3.51 seconds. 0 unindexed files recovered to lost and found. Phase duration (Orphan recovery to lost and found): 831.50 milliseconds. 89499 reparse records processed. Phase duration (Reparse point and Object ID verification): 126.40 milliseconds. Stage 3: Examining security descriptors ... Cleaning up 4355 unused index entries from index $SII of file 0x9. Cleaning up 4355 unused index entries from index $SDH of file 0x9. Cleaning up 4355 unused security descriptors. Security descriptor verification completed. Phase duration (Security descriptor verification): 53.09 milliseconds. 290506 data files processed. Phase duration (Data attribute verification): 0.63 milliseconds. CHKDSK is verifying Usn Journal... Usn Journal verification completed. Stage 4: Looking for bad clusters in user file data ... 1548784 files processed. File data verification completed. Phase duration (User file recovery): 8.46 minutes. Stage 5: Looking for bad, free clusters ... 37466886 free clusters processed. Free space verification is complete. Phase duration (Free space recovery): 15.45 seconds. Windows has made corrections to the file system. No further action is required. 487625727 KB total disk space. 335420612 KB in 1106092 files. 713056 KB in 290507 indexes. 0 KB in bad sectors. 1624511 KB in use by the system. 65536 KB occupied by the log file. 149867548 KB available on disk. 4096 bytes in each allocation unit. 121906431 total allocation units on disk. 37466887 allocation units available on disk. Total duration: 9.43 minutes (565968 ms). Internal Info: 00 a2 17 00 8a 3b 15 00 39 db 23 00 00 00 00 00 .....;..9.#..... fe 07 00 00 9d 55 01 00 00 00 00 00 00 00 00 00 .....U..........&lt;/Data&gt;
      
        &lt;/EventData&gt;
      
        &lt;/Event&gt;
      
      1. Repaired SQL Server components using the provided installers.

      These are what I repaired using the Application Manager:

      Repaired Microsoft SQL Server 2022 LocalDB

      Repaired Microsoft SQL Server 2019 LocalDB

      Repaired Microsoft OLE DB Driver for SQL Server
      

      Repaired Microsoft System CLR Types for SQL Server 2019

      Repaired Microsoft ODBC Driver 17 for SQL Server

      Repaired Microsoft VSS Writer for SQL Server 2022
      
      1. Encountered issues with Windows Update not completing successfully, specifically:
         Security Update for SQL Server 2022 RTM GDR (KB5035432)
         Install error - 0x80070643
        
      2. Tried various commands and services to reset Windows Update components and re-register DLLs, but the issue persists.

      Here are the results of using the update troubleshooter:

      | Windows Update | Publisher details |
      | --- | --- |
      
      Issues found
      Check for Windows Update issues Detected
      Resolve Windows Update issues Completed <br> --- --- Potential issues that were checked
      --- ---
      Some security settings are missing or have been changed Issue not present
      Check for missing or corrupt files Issue not present
      Service registration is missing or corrupt Issue not present Issues found Detection details
      --- --- 6 Check for Windows Update issues Detected <br> --- --- --- ---
      ---
      Detects issues related to Windows Update. Potential issues that were checked Detection details
      --- --- Some security settings are missing or have been changed Issue not present <br> --- ---
      --- Check for missing or corrupt files Issue not present <br> --- ---
      --- Service registration is missing or corrupt Issue not present
      --- --- Detection details
      --- --- IsPostback_RC_PendingUpdates
      ---
      IsPostback: False WaaSMedicService
      ---
      Issue found by:BinaryHealthPlugin;DynamicProtectionPlugin IsPostback_RC_PendingUpdates
      ---
      IsPostback: True Service Status
      ---
      Problem with BITS service : The requested service has already been started. System.Management.Automation.RemoteException More help is available by typing NET HELPMSG 2182. System.Management.Automation.RemoteException Service Status
      ---
      Problem with BITS service : The requested service has already been started. System.Management.Automation.RemoteException More help is available by typing NET HELPMSG 2182. System.Management.Automation.RemoteException Collection information
      --- ---
      Computer Name: FRACTALG
      Windows Version: 10.0
      Architecture: x64
      Time: Saturday, June 1, 2024 10:27:46 AM Publisher details
      --- --- Background Intelligent Transfer Service
      --- ---
      Find and fix problems that may prevent background downloads from working
      Package Version: 3.5
      Publisher: Microsoft Windows Windows Network Diagnostics
      --- ---
      Detects problems with network connectivity.
      Package Version: 4.0
      Publisher: Microsoft Windows Windows Update
      --- ---
      Resolve problems that prevent you from updating Windows.
      Package Version: 9.3
      Publisher: Microsoft Windows Windows Update
      --- ---
      Resolve problems that prevent you from updating Windows.
      Package Version: 9.2
      Publisher: Microsoft Corporation
      1. I tried recovering to a recovery point before I started working on the assignment. No luck.

      Windows Update Troubleshooter Report:

      I have attached screenshots of the error messages and steps taken for reference. This problem originated while working on an assignment for my C# class in Visual Studio where I was creating a publish script to connect to localdb. I wasn't able to connect on my main computer and had to complete the assignment on my laptop (a less than ideal situation for me).

      This is a big problem for me, since I need to be able to use localdb for future assignments in school.

      I have tried these things listed as well as others that I can't remember at the moment. I have tried uninstalling and reinstalling SQL Server, as well as deleting every SQL Server related program and reinstalling. I have tried using the Visual Studio installer to repair, uninstall, and reinstall Visual Studio itself as well as the SQL extension.

      I've skimmed through these forums as well as Microsoft Documentation and have been unable to find a solution.

      I have also done a full system scan using Windows Defender, which took a few hours and found 0 issues.

      Photos: (these are the same photos referenced earlier in the post)
      Publish Script

      VS Connect Interface

      Resource Integrity

      Windows Update Troubleshooter

      Windows Update Error Message

      SQL Server 2022 Update

  • Windows for business | Windows Server | Devices and deployment | Install Windows updates, features, or roles

    Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

    0 comments No comments
    {count} votes
    Answer accepted by question author
    1. Anonymous
      2024-06-03T08:11:12+00:00

      Hello Justin Lietz,

      thank you for posting on the Microsoft Community Forums.

      Based on the description, I understand that your issue is related to SQL Server.

      Since there are no engineers dedicated to SQL Server in this forum. In order to be able to deal with your questions quickly and efficiently, I recommend that you repost your questions in the Q&A forum, where there will be a dedicated engineer to provide you with a professional and effective response.

      Here is a link to the Q&A forum: https://learn.microsoft.com/en-us/answers/questions/

      Have a nice day.

      Best regards,

      Lei

      0 comments No comments

    0 additional answers

    Sort by: Most helpful