Quantcast
Channel: AutoSPInstaller
Viewing all articles
Browse latest Browse all 2279

Commented Unassigned: SQL server alias on local machine is always created using shared memory despite the port is specified [20475]

$
0
0
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: AssiStor **


I agree with Marat. I ran into the same issue and was to fix it using exactly your suggestion. If a port is specified, the automatic alias creation produces an invalid alias string (because the port is added) which does not work in combination with shared memory.
I prefer the solution to force TCP/IP instead of Shared Memory in cases a port is specified. Additionally this could be mentioned in the configuration file as comment: omitting the port in combination with a servername that matches the computername is producing shared memory aliases.


Viewing all articles
Browse latest Browse all 2279

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>