I can't find how to identify which of my locally installed SQL instances should be the one that get the (local) designation. I looked in SQL Configuration manager and there isn't one defined that I can see.
1 Answer
It's always the default instance (the one running under the service named "MSSQLSERVER").
But connections to (local) will try various protocols, and if you've got your default instance stopped, or have disabled the Shared Memory, then clients connecting to (local) will connect to whichever instance listens on port 1433 or is listening on the \\.\pipe\sql\query pipe. Both of which can be configured in the Configuration Manager.
If doing this I would probably have only TCP/IP enabled in the protocols for the server for simplicity.
5 Comments
Tom McDonald
I don't have MSSQLSERVER, I turned that off and am trying to designate a different DB as (local)
David Browne - Microsoft
See updated answer
Tom McDonald
No luck, I've disabled all mssqlserver services and network protocols. I enabled all msslqserver01 services and protocols and restarted, but (local) doesn't connect. Its listening on NAMED PIPE \\.\pipe\MSSQL$MSSQLSERVER01\sql\query and NOT \\.\pipe\sql\query. I could change it, but I'm concerned that will start a new issue.
Tom McDonald
As I didn't have an alternative I changed it to use \\.\pipe\sql\query and now it is connected.
Jeroen Mostert
@TomMcDonald: Note that the SQL Server configuration manager will allow you to define aliases for anything, including things that are normally hard-coded, like
(local) and .. Effectively you can point (local) to any server and any instance you like, so aliasing (local) to localhost\instancename to point it to a specific instance will work regardless of what's actually running (though it might be disorienting to people not expecting an alias).