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

Unable to Connect To SQL 2012

Sep 2, 2013 at 2:11 PM
I have a thread on StackExchange I need help with.
It seems that SQL Server 2012 requires the default port 1433 be specified when connecting to it a requirment that does not exist in earlier versions. I think this is causing connection issues with the SharePoint powershell cmdlets.

For instance, when connecting to SLQ 2012, the function CheckSQLAccess had to be altered by adding ',1433' to connection string like so:
$objSQLConnection.ConnectionString = "Server=$sqlServer,1433;....

This issue is causing the New-SPContentDatabase to fail during SP2010 farm setup.

See the link below for the error messages I am seeing.

Any help that could find a work-around would be greatly appreciated.

Sep 2, 2013 at 3:04 PM
I believe AutoSPInstaller has been ammended to correct this port specification issue are you using v3.87 of AutoSPInstaller?

I changed the Auto SPInstaller code to work around the restriction as follows:
$objSQLConnection.ConnectionString = "Server=$sqlServer,1433;Integrated Security=SSPI;"
My fix is to add a new element in the config.xml <DBServerPort>1433</DBServerPort>.
Sep 2, 2013 at 5:31 PM
yes v3.87
Sep 2, 2013 at 5:47 PM
Yes i did that similar fix which does get around the CheckSQLAccess function. The problem I have now is that the New-SPConfigurationDatabase call fails all the time with the error codes specified in my StackExchange post.
Sep 2, 2013 at 11:39 PM
This was an issue but it was fixed within AutoSPInstaller.

I have been using SQL 2012 and there hasn't been a problem. I have also being using a non default port.

Can you confirm you can connect to your SQL instance through ODBC on your computer? Also confirm your Farm and Install accounts have correct permissions.