I am installing all-in-one machine having SQL and sharepoint. I am specifying the sql alias for the same machine and the port as I want to have TCP connection. however the script tries to create the shared memory connection .
my computer is DEV1
my config is
<Database>
<DBServer>SPSQL</DBServer>
<DBAlias Create="true" DBInstance="DEV1" DBPort="1433" />
<DBPrefix>SP</DBPrefix>
<ConfigDB>Config</ConfigDB>
</Database>
solution:
change function Add-SQLAlias
replace the line
If ((MatchComputerName $SQLInstance $env:COMPUTERNAME) -or ($SQLInstance.StartsWith($env:ComputerName +"\"))) {
with
If ((MatchComputerName $SQLInstance $env:COMPUTERNAME) -or ($SQLInstance.StartsWith($env:ComputerName +"\")) -and ($port-eq '')) {
Comments: ** Comment from web user: mbakirov **
my computer is DEV1
my config is
<Database>
<DBServer>SPSQL</DBServer>
<DBAlias Create="true" DBInstance="DEV1" DBPort="1433" />
<DBPrefix>SP</DBPrefix>
<ConfigDB>Config</ConfigDB>
</Database>
solution:
change function Add-SQLAlias
replace the line
If ((MatchComputerName $SQLInstance $env:COMPUTERNAME) -or ($SQLInstance.StartsWith($env:ComputerName +"\"))) {
with
If ((MatchComputerName $SQLInstance $env:COMPUTERNAME) -or ($SQLInstance.StartsWith($env:ComputerName +"\")) -and ($port-eq '')) {
Comments: ** Comment from web user: mbakirov **
well, i think it should be like this
if i specify local server and NO port - it is shared memory
if I specify local server AND the port (which i do) it obviously means i want to force the thing to work over tcp.
that's was my fix suggested.