Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install SQL Server 2014 Express via command line

How can I install SQL Server 2014 Express via command line on a new Windows 7 machine?

I tried the following command line; I didn't see any SQL service running or installed although no errors were shown. So what's the wrong with it? Any idea?

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 
like image 928
MarwaAhmad Avatar asked Oct 18 '22 14:10

MarwaAhmad


1 Answers

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"
like image 68
MarwaAhmad Avatar answered Oct 21 '22 05:10

MarwaAhmad