Silent install SQL Server Express 2014
Include the main steps for how to do silent installation for SQL Server Express
Silent install may very helpful in some situation, for example integrate SQL Express in our own installer or integration testing. Please note all commands should be run under administrator mode.
Files
Setup files can be downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=42299
- SQL Server express only file: SQLEXPR_x64_ENU.exe
- SQL Management Studio file: SQLManagementStudio_x64_ENU.exe
- Configuration file: Sql2014ConfigurationFile.ini
Install SQL Express
-
Extract file
SQLEXPR_x64_ENU.exe /x:d:\temp\SQLEXPR_x64 /q
-
Install
CD to the extract folder, put the ini file in the same folder.SETUP.EXE /ConfigurationFile=Sql2014ConfigurationFile.ini /SAPWD=xxx
Install SMSS
- Extract file
SQLManagementStudio_x64_ENU.exe /x:d:\temp\SMSS /q
- Install
CD to the extract folderSETUP.EXE /ACTION=INSTALL /QUIET /FEATURES=SSMS /IAcceptSQLServerLicenseTerms
Check install result
The log files can be found under:
%programfiles%\Microsoft SQL Server\120\Setup Bootstrap\Log
Mostly just need to check Summary.txt.
Enable TCP port 1433 for SQL instance for remote access
- Run below script in Powershell
Import-Module “sqlps” $smo = 'Microsoft.SqlServer.Management.Smo.' $wmi = new-object ($smo + 'Wmi.ManagedComputer'). # List the object properties, including the instance names. $Wmi # Enable the TCP protocol on the default instance. $uri = "ManagedComputer[@Name='" + (get-item env:\computername).Value + "']/ServerInstance[@Name='SQLEXPRESS']/ServerProtocol[@Name='Tcp']" $Tcp =