To check if LocalDb is installed or not:
cmd
and type in sqllocaldb i
this should give you the installed sqllocaldb instances if found.(localdb)\V11.0
using windows authentication.If an error is raised Cannot connect to (localdb)\V11.0.
change the instance name to (localdb)\MSSQLLocalDB
and try again to connect, if you still get the same error.
Follow these steps to install LocalDb:
Start Menu
and type in search sqlLocalDb
.sqlLocalDb.msi
and click it.after finishing the installation re-run SSMS
and try connecting to either of the instances (localdb)\V11.0
or (localdb)\MSSQLLocalDB
, one of it should work depending on what Visual Studio version you have.
You can also verify that localdb
is installed using Visual Studio by simply creating new sql file and go to the connect icon on the top header of the file which by default lists all the servers you can connect to including localdb
if installed.
In addition to the above mentioned ways of finding if localdb is installed, you can also use the MS windows power shell
or windows command processor CMD
or even NuGet package manager console
on your server machine and run these commands sqllocaldb i
and sqllocaldb v
that will show you the localdb name if it is installed and the MSSQL server version installed and running on your machine.