通过命令行安装SQL Server 2014 Express

时间:2016-03-06 17:05:17

标签: sql-server cmd sql-server-express

如何在新的Windows 7计算机上通过命令行安装SQL Server 2014 Express?

我尝试了以下命令行;虽然没有显示错误,但我没有看到任何正在运行或安装的SQL服务。那么它的错误是什么?有什么想法吗?

SQLEXPRESS.EXE /qs /ACTION=Install /FEATURES=SQLEngine 
               /INSTANCENAME=SQLEXPRESS 
               /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" 
               /SQLSVCPASSWORD="STR0NGP@$$" 
               /SQLSYSADMINACCOUNTS="NT AUTHORITY\NETWORK SERVICE" 
               /AGTSVCACCOUNT="NT AUTHORITY\Network Service" 
               /TCPENABLED=0 /X86="True" /SQMREPORTING="False" 
               /ISSVCSTARTUPTYPE="Automatic"  
               /ASCOLLATION="Latin1_General_CI_AS" 
               /SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS"  
               /RSINSTALLMODE="FilesOnlyMode"
               /IACCEPTSQLSERVERLICENSETERMS 

1 个答案:

答案 0 :(得分:3)

Solved it: 
this will enable Mixed Authentication; SQL & windows. 
Also login using sa directly after installing the SQL server express.

SQLEXPRESS.EXE 
/IACCEPTSQLSERVERLICENSETERMS /HIDECONSOLE  
/Role="AllFeatures_WithDefaults" /INSTANCEID="SQLEXPRESS" 
/ACTION="Install" /HELP="False" /INDICATEPROGRESS="True" 
/QUIETSIMPLE="True" /X86="True" /ERRORREPORTING="False" 
/SQMREPORTING="False" /INSTANCENAME="SQLEXPRESS" 
/AGTSVCSTARTUPTYPE="Manual" /ISSVCSTARTUPTYPE="Automatic"    
/ISSVCACCOUNT="NT AUTHORITY\NetworkService"
/ASSVCSTARTUPTYPE="Automatic" /ASCOLLATION="Latin1_General_CI_AS" 
/ASDATADIR="Data" /ASLOGDIR="Log" /ASBACKUPDIR="Backup" /ASTEMPDIR="Temp" 
/ASCONFIGDIR="Config" /ASPROVIDERMSOLAP="1" 
/SQLSVCSTARTUPTYPE="Automatic"
/FILESTREAMLEVEL="0" /ENABLERANU="True"     
/SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS" 
/SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" 
/ADDCURRENTUSERASSQLADMIN="True" 
/TCPENABLED="0" /NPENABLED="0" 
/BROWSERSVCSTARTUPTYPE="Disabled" /RSSVCSTARTUPTYPE="Automatic" /SECURITYMODE=SQL 
/SAPWD="Strong1Pa$$word"