How to add LocalDB to Visual Studio 2015 Community's SQL Server Object Explorer?

前端 未结 7 1095
时光说笑
时光说笑 2020-12-23 16:34

Problem

I don\'t understand how to make LocalDB show up in the SQL Server Object Explorer. On some VMs, it shows up automatically, on some other VMs, it doesn\'t. S

相关标签:
7条回答
  • 2020-12-23 17:00

    To check if LocalDb is installed or not:

    • run cmd and type in sqllocaldb i this should give you the installed sqllocaldb instances if found.
    • Run SSMS (SQL Server Management Studio).
    • Try to connect to this instance (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:

    • Close SSMS.
    • Close VS (Visual Studio) if it's running.
    • Go to Start Menu and type in search sqlLocalDb.
    • From the results that appears choose sqlLocalDb.msi and click it.
    • SQL setup will start to install LocalDB

    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.

    0 讨论(0)
提交回复
热议问题