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
- Blocked by the firewall on the inbound or outbound machine
- 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;