0

I looked at How can I determine installed SQL Server instances and their versions? already but CMD returns nothing:

C:\Windows\system32>sqlcmd -L

C:\Windows\system32>

But when using Visual Studio (v2019), I go to View > SQL Server Object Explorer, I see two SQL Server instances with system databases inside. One is called (LocalDB)\MSSQLLocalDB and the other (LocalDB)\ProjectsV13.

Both are using SQL Server 2016 (v13.0.4001). Using that I was able to connect through SSMS 2018 as well.

My question is: why aren't these instances showing up in the command line? And can I delete one of the server instance? Why are there two?

jarlh
  • 42,561
  • 8
  • 45
  • 63
Shervin Rad
  • 460
  • 9
  • 21
  • 2
    Is the SQL Server Browser service running? – Andrew Morton Apr 23 '20 at 15:50
  • @AndrewMorton I checked my services and I there is only SQL Server VSS write. everything else is irrelevant to SQL. I looked up in SQL Server configuration manager but SQL Server services is empty there as well. I checked in C:\Program Files (x86)\Microsoft SQL Server\90\Shared and sqlbrowser.exe was not there also. – Shervin Rad Apr 23 '20 at 19:29
  • 1
    Have you seen [Why does sqlcmd -Lc not show the local instance?](https://dba.stackexchange.com/q/18499/143697) – Andrew Morton Apr 24 '20 at 08:26
  • @AndrewMorton thank you for the link. I had a look but unfortunately the solution takes me to SQL Server Configuration Manager and I still have no SQL Server Service instances to work with there. Also, since I'm accessing a local server instance, I doubt there would be problems with UDP packet loss. – Shervin Rad Apr 24 '20 at 18:18
  • If the UDP packets are not allowed through the firewall then there will be 100% packet loss, so that is something to check. – Andrew Morton Apr 24 '20 at 18:22
  • I just tried setting up inbound and outbound rules on TCP 1433 and UDP 1434 to allow connections. Failed again with nothing returned from cmd. Is there a way to check error logs? – Shervin Rad Apr 24 '20 at 18:34
  • 1
    [How do I access a firewall log (Windows 10 w. Windows Defender)](https://security.stackexchange.com/q/166875/114527). – Andrew Morton Apr 24 '20 at 18:36
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/212442/discussion-between-shervin-rad-and-andrew-morton). – Shervin Rad Apr 24 '20 at 18:56

1 Answers1

0

Using SSMS, in the connection manager typing the following in the server name box does it:

  1. .
  2. open cmd and type hostname, and use that
  3. (LocalDB)\MSSQLLocalDB
  4. (LocalDB)\ProjectsV13 I think this depends on the installation
Shervin Rad
  • 460
  • 9
  • 21