Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Quiet (unattended) install of SQL Server Express LocalDb 2019

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.

like image 857
msporek Avatar asked Apr 22 '20 08:04

msporek


1 Answers

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

like image 186
AlwaysLearning Avatar answered Oct 21 '22 01:10

AlwaysLearning