I am having trouble with PowerShell cmdlets connecting and executing against SQL 2012 SP1 on WinSvr 2012.
I am executing the New-SPContenDatabase cmdlet from another machine on the same network. The account I am running this cmdlet under is Administrator on both boxes. The same account is also in the sysadmin, serveradmin, & public roles on the SQL Server.
On the remote machine I can connect to SQL Server using SQL Management Studio under the same user context and do all things like create databases and other activities like a sysadmin role would allow.
I should also tell you that the box I running the cmdlet on is WinSvr 2008.
I am trying to identify if there is any other settings that I need to make this cmdlet work. I remember in SQL 2008 there was a "Remote Connections" setting in the Surface Area Configuration Wizard" but I am not sure if that applies here because I can connect remotely using SQL Mgmt Studio.
In the SQL Logs I am not seeing any login errors or evidence that the remote machine is even conducting any operations at all.
Here are the errors in the event log of the machine executing the cmdlet.
1) Log Name: Application
Source: Microsoft-SharePoint Products-SharePoint Foundation
Date: 9/1/2013 1:07:52 PM
Event ID: 5586
Task Category: Database
Level: Error
Keywords:
User: CORP\xxxxx
Computer: xxxxx
Description:
Unknown SQL Exception 11001 occurred. Additional error information from SQL Server is included below.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - No such host is known.)
Event Xml:
2) Log Name: Application
Source: Microsoft-SharePoint Products-SharePoint Foundation
Date: 9/1/2013 1:07:03 PM
Event ID: 3363
Task Category: Database
Level: Critical
Keywords:
User: CORP\xxxxx
Computer: xxxxx
Description:
Cannot connect to database master at SQL server at example.com. The database might not exist, or the current user does not have permission to connect to it.
Update: I added another SQL 2008 R2 Server to the Mix and then ran the exact same SharePoint Powershell script without any connection error. This tells me I am missing some type of configuration on the SQL 2012 Server which is preventing me from connecting OR (unlikely) SharePoint cmdlets are not compatible. It seems SQL Server 2012 REQUIRES the port 1433 be specified not matter what which I think is causing my problem. If I could get SQL2012 to not require this (just like SQL 2008) then I think I'll be in business.