Hi Brian,
I tried AutoSPInstaller using SQL 2012 on Windows 2008 R2. When PS tries to test the SQL connection, it builds up a connection string using the element <DBServer>192.168.1.2</DBServer>; the install throws the rror "- Connection Error. Check server name, port, firewall.".
If the SQL Server is the default instance and not a named instance, you need to specify the port number if using SQL Server 2012. The change appears to me to be: to connect to a SQL 2008 database you did not need to specify the default port for the default instance but in SQL Server 2012, you need to specify the default port 1433.
The line 4461 causing the error in "AutoSPInstallerFunctions.ps1" is:
$objSQLConnection.ConnectionString = "Server=$sqlServer;Integrated Security=SSPI;"
A correction that works withoug getting it from the configuration xml isL
$objSQLConnection.ConnectionString = "Server=$sqlServer,1433;Integrated Security=SSPI;"
My fix is to add a new element in the config.xml <DBServerPort>1433</DBServerPort>. Then I edited the connection string to be built up using the 1433 port number.
Using (local) or localhost for the DBServer setting works for local machines.
kind regards,
paul
blog. http://blog.sharepointsite.co.uk
Comments: ** Comment from web user: paulbeck **
I tried AutoSPInstaller using SQL 2012 on Windows 2008 R2. When PS tries to test the SQL connection, it builds up a connection string using the element <DBServer>192.168.1.2</DBServer>; the install throws the rror "- Connection Error. Check server name, port, firewall.".
If the SQL Server is the default instance and not a named instance, you need to specify the port number if using SQL Server 2012. The change appears to me to be: to connect to a SQL 2008 database you did not need to specify the default port for the default instance but in SQL Server 2012, you need to specify the default port 1433.
The line 4461 causing the error in "AutoSPInstallerFunctions.ps1" is:
$objSQLConnection.ConnectionString = "Server=$sqlServer;Integrated Security=SSPI;"
A correction that works withoug getting it from the configuration xml isL
$objSQLConnection.ConnectionString = "Server=$sqlServer,1433;Integrated Security=SSPI;"
My fix is to add a new element in the config.xml <DBServerPort>1433</DBServerPort>. Then I edited the connection string to be built up using the 1433 port number.
Using (local) or localhost for the DBServer setting works for local machines.
kind regards,
paul
blog. http://blog.sharepointsite.co.uk
Comments: ** Comment from web user: paulbeck **
I've now got the problem in reverse.
I am using an Allways On Availability Group (AOAG) and connecting to the listener. The AutoSPInstaller creates my SQL Aliase for me, which looks perfect at HKLM:\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo\
My aliase looks line 'Alaise1' value 'DBMSSOCN,SQL-Listener\instance,1433' which does not work, if I change this to ''DBMSSOCN,SQL-Listener\instance' it works.