Patching SQL Server LocalDB
Asked Answered
P

1

1

I have an installation of SQL Server 2017 LocalDb (v14.0.1000.169). I want to patch this installation using the latest CU an in an unattended manner.

When I run the setup.exe from SQLServer2017-KB4508218-x64, however, it says I have don't have an appropriate version installed.

C:\test\extracted>setup.exe /action=patch /allinstances /quiet /IAcceptSQLServerLicenseTerms
Microsoft (R) SQL Server 2017 14.00.3223.03
Copyright (c) 2017 Microsoft.  All rights reserved.

No features were updated during the setup execution. The requested features may not be installed or features are already at a higher patch level. Please review the summary.txt logs for further details.
The version of SQL Server instance Shared Component does not match the version expected by the SQL Server update. The installed SQL Server product version is 13.1.4414.46, and the expected SQL Server version is 14.0.1000.169.

But I definitely have localdb installed with that version:

C:\test\extracted>sqllocaldb versions 
Microsoft SQL Server 2017 (14.0.1000.169)

What am I doing wrong here? Is there another way to update LocalDB? I need to do so because of a known issue with this version of LocalDB.

Running the installer interactively doesn't help - gives the same message.

Polky answered 5/9, 2019 at 18:15 Comment(3)
What does the summary.txt say? Also, are you sure your machine is 64bit and that is the version of SQL Server you have installed (64bit not 32bit)?Quickel
The summary.txt essentially says the same thing as the message I pasted from the console. Is there an x86 version of SQL 2017? It doesn't appear so.Polky
I'm wondering if this is a long standing bug in the CU installers. Unfortunately, there is no updated localdb MSI available newer than RTM. At least that I can find. sqlblog.org/2012/09/06/sqllocaldb-vs-cumulative-updatesPolky
P
2

It appears that if you only install localdb using the sqllocaldb.msi, the CU installers will never be able to patch your localdb instances. This appears to be a long standing bug:

https://sqlblog.org/2012/09/06/sqllocaldb-vs-cumulative-updates

Since Microsoft has not provided an updating sqllocaldb.msi beyond the RTM version, you are left with having to use the full installer for the Express edition and then apply the CU using the CU installer.

This successfully detected localdb (along with the instance of Express I was forced to install) and patched both.

Polky answered 6/9, 2019 at 20:31 Comment(1)
This was fixed in support.microsoft.com/en-us/topic/…Kun

© 2022 - 2024 — McMap. All rights reserved.