0
votes

I am installing Sql server via NSIS. but while connecting to Sql by Sqlconnection object in C# It gives me error that "Network Related or instance specific error..."

I am using following code. I need to create named instance as SQLEXpress2

ExecWait '"$INSTDIR\SQLEXpress2\SQLEXPRWT_x64_ENU.exe" /q /action=Install /features=SQL,SSMS /instancename=SQLEXpress2/IACCEPTSQLSERVERLICENSETERMS="True" /enableranu=1 /AddCurrentUserAsSqlAdmin="True" /SQLSVCACCOUNT="NT AUTHORITY\SYSTEM" /SQLSYSADMINACCOUNTS="" /AGTSVCACCOUNT="NT AUTHORITY\SYSTEM" /skiprules=RebootRequiredCheck'

and I notices in Sql configuration manager the remote procedure call fails and named pipe , TCP ip protocols are disabled.

1
The crystal ball does not help much with urgent problems, moreover without any detail. Provide your NSIS code relative to Sql server deployment. BTW do you manage to connect directly from deployed Sqlserver? You may also miss the .net assemblies relative to sqlserver... - Seki
I have edit the post. I installed .net framework. which assemblies needed ? - Rohi

1 Answers

1
votes

I have installed SQL Express 2014 SP1 with silent installation using nsis script which works successfully.

Function  InstallSQL

 ExecWait '"$temp\SQLEXPRADV_x64_ENU.EXE" /Q /ACTION=Install /SkipRules=RebootRequiredCheck /IACCEPTSQLSERVERLICENSETERMS /FEATURES=SQL,SSMS /INSTANCENAME="SQLEXPRESS2014" /SQLSVCACCOUNT="NT AUTHORITY\Network Service" /SQLSVCStartupType=Automatic /AddCurrentUserAsSqlAdmin /ENABLERANU=1 /hideconsole /SECURITYMODE=SQL /SAPWD="Sql@1234" /AGTSVCSTARTUPTYPE=Manual /NPENABLED=1 /TCPENABLED=1'

FunctionEnd