Silent install SQL Server Express 2014

本文详细介绍了如何进行SQL Server Express的静默安装,包括安装文件获取、SQL Express及SMSS的安装步骤、安装结果检查、启用TCP端口1433以允许远程访问,以及配置文件的生成方法。静默安装适用于集成到自己的安装程序或集成测试中。
摘要由CSDN通过智能技术生成

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

  1. SQL Server express only file: SQLEXPR_x64_ENU.exe
  2. SQL Management Studio file: SQLManagementStudio_x64_ENU.exe
  3. Configuration file: Sql2014ConfigurationFile.ini

Install SQL Express

  1. Extract file

    SQLEXPR_x64_ENU.exe /x:d:\temp\SQLEXPR_x64 /q
    
  2. Install
    CD to the extract folder, put the ini file in the same folder.

     SETUP.EXE /ConfigurationFile=Sql2014ConfigurationFile.ini /SAPWD=xxx
    

Install SMSS

  1. Extract file
    SQLManagementStudio_x64_ENU.exe /x:d:\temp\SMSS /q
    
  2. Install
    CD to the extract folder
    SETUP.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

  1. 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 =
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值