My computer has at least 3 installations of SQL Server:
localhost\SQLEXPRESS
. Version is 14.0.1000I have looked inside HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL
and found :
MSSQLSERVER
(which is the default instance name, right ?)SQLEXPRESS
which is the Express versionSo, the 2016 LocalDB is not used anymore by any application? (including Visual Studio)
In SSMS
which command should I use to connect to MSSQLSERVER
or SQLEXPRESS
?
To connect to your default instance on your local machine, use this as your "server/instance" name:
.
(local)
localhost
your-machine-name
your-ip-address
For the default instance, you must NOT specify the MSSQLSERVER
"instance" name...
And if the SQL Server is on another machine, you need to use either that remote machine's machine name (or the IP address) for connecting to it.
For any other instance, you need to use any of the above, plus you need to add the instance name to it - in your case, for SQL Server Express, it defaults to SQLEXPRESS
, so use
.\SQLEXPRESS
(local)\SQLEXPRESS
localhost\SQLEXPRESS
your-machine-name\SQLEXPRESS
your-ip-address\SQLEXPRESS
The LocalDB is not handled the same as the other editions - it is not by default started as Windows startup, but it only gets started when your Visual Studio solution is run (and therefore needs to use the LocalDB instance). With the SqlLocalDB
utility (see details here ), you can also explicitly start up a LocalDB instance (and shut it down again, too).