Wednesday, December 3, 2014

SQL Server does not exist or access denied

Situation:
New SQL Express 2012 on Server 2008 r2 (specifics shouldn't matter)
Trying to connect to the DB from another server (local subnet).
Was getting error "SQL Server does not exist or access denied."
Couldn't telnet to port 1433. Could to other ports.
TCP/IP and named pipes enabled.
Services properly authenticated and started/restarted.
Firewall exceptions given to 1433 on SQL server's inbound (even tried disabling firewall)
What tripped me up was that I was working with a non-default instance (original one was disabled). Apparently, the non-default instance gets a random port generated for it. Also, the port doesn't seem to show itself anywhere in the SQL mgmt tools.
The port was found here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQLServer\SuperSocketNetLib\Tcp\IPAll
I put it in the firewall inbound exceptions, success.