This project has moved and is read-only. For the latest updates, please go here.

Error Using a DNS Alias for SQL Server in a Single-Server Installation

Topics: General Questions
Jul 23, 2014 at 3:43 AM
I am building a single-server installation of SharePoint 2013 on Windows Server 2012 R2. I have installed SQL Server 2012 SP 1 and full Active Directory and DNS on the same server. When I run AutoSPInstaller using the server name "SPSERVER" as the input value for the DBServer parameter the process runs fine. However, one of the things I tried to do was set up a DNS alias for the SQL Server as "SQLCLUSTER", to better represent a simulated real-world farm, and used that as the input value for DBServer. When I do that strange things happen. The farm is provisioned but as the services get deployed, they are registered to SQLCLUSTER rather than SPSERVER. This shouldn't matter except that AutoSPInstaller uses the MatchComputerName function to constantly check the current computer name against the list of farm servers. This is where it goes haywire. The value of $env:COMPUTERNAME correctly comes back as SPSERVER but $_.Server.Address always comes back with SQLCLUSTER as the only server in the list. This causes the script to halt at the first service installation. When I run Get-SPServer sure enough, the farm is created and validly registered except that there is only one server listed, SQLCLUSTER, and all SharePoint services are registered to it. As an aside, I've manually built multiple Single-Server installations of SharePoint over the years using a DNS alias for the SQL Server and never run into this problem so it surprises me that the PowerShell cmdlets would behave differently from PSConfig.