Question

I have a windows server 2012 R1 Enterprise that my colleague set up in a virtualized environment, the host PC is no not domain joined, but the virtual environment is.

The issue is for some reason that server is not able to connect to SQL servers within the domain network. I've enabled IP/firewall and I can connect to the SQL server from all the other non-virtual machines, so, I don't think it's to do anything with the SQL

It's just that hyper-v environment that I'm having issues with. I cannot even connect using the excel, it simply says "SQL Server does not exist or access denied." Anyone else experienced the same issue?

here is the error message I get trying to connect to one of SQL servers.

 "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 corrrect and that SQL server is configured to allow remote connection. (Provider: Named Pipes Provider, Error: 40-Could not open a connection to SQL server) (Microsoft SQL Server, Error:5) --> Access is denied

thanks

Was it helpful?

Solution

Normally the order and types of protocols used to connect to sql server are configured when sql server is installed. the order and priority of which can be used to influence the default connection protocol when using SQL server management studio The error

(Provider: Named Pipes Provider, Error: 40-Could not open a connection to SQL server) (Microsoft SQL Server, Error:5) --> Access is denied"

Indicates that the protocol on the SQL server that the SQL server management studio is requested is either

  1. Blocked by the firewall on the inbound or outbound machine
  2. Or the protocol is not enabled

The connection protocol default can be overridden by selecting the connection properties tab and selecting another protocol choice other than default.

to see what default is configured for (on the server that sql studio is installed on" run the following query against the master database

SELECT net_transport 
  FROM sys.dm_exec_connections 
       WHERE session_id = @@SPID;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top