Quiet (unattended) install of SQL Server Express LocalDb 2019
Asked Answered
M

2

7

With SQL Server Express LocalDb 2012 (Microsoft MSI download) it was possible to do an unattended install from a command line:

msiexec /i SqlLocalDB.msi /qn IACCEPTSQLLOCALDBLICENSETERMS=YES

This works pretty stable for me on various versions of MS Windows I have tested.

I cannot get it working this way with the SQL Server Express LocalDb version 2019 (Microsoft MSI download). The combination of switches that worked before does not work any more.

How to install the SQL Server Express LocalDb 2019 (the particular SqlLocalDB.msi) in a quiet (unattended) mode?

I have also tried to download the SQL Server 2019 media and call the setup.exe with switches as provided in the documentation (MS Documentation of running setup.exe) but it does not allow me to install LocalDb neither. I have tried a few combinations of switches like the one below, and it does not work for me, the product does not get installed.

setup.exe /Q /IACCEPTSQLSERVERLICENSETERMS /ACTION="install" /FEATURES=LocalDb

I would be grateful for any suggestions.

Millenary answered 22/4, 2020 at 8:7 Comment(0)
R
11

LocalDB is a feature of SQL Server Express, so download SQL Server Express 2019, then:

SQL2019-SSEI-Expr.exe /Action=Download /MediaType=LocalDB /Quiet

This saves the LocalDB installer to: %USERPROFILE%\Downloads\en-US\SqlLocalDB.msi

You can now install LocalDb with the basic GUI (progress bar only):

msiexec.exe /qb /i %USERPROFILE%\Downloads\en-US\SqlLocalDB.msi IAcceptSqlLocalDBLicenseTerms=YES

Revenge answered 22/4, 2020 at 9:36 Comment(2)
Thank you, is it possible to install the LocalDb with no GUI? no progress bar? Just fully unattended as it was possible with SQL 2012?Millenary
Sorry, @msporek, I was not able to use the /qn (no gui) switch successfully. The msiexec.exe process just seemed to hang around consuming no CPU and virtually no memory.Revenge
D
0

I got the fully unattended (/qn) install working by running the command from an elevated (Run as administrator) command prompt.

Derrek answered 16/6, 2020 at 8:45 Comment(1)
Could you provide more details (e.g. the command line parameters you used)? I couldn't make it work either.Hagiology

© 2022 - 2024 — McMap. All rights reserved.