Thursday, March 26, 2020

Connect to SQLLocalDB from SSMS

SQLLocalDB is used by VS.Net for local db dev and to reduce the need for SQL Express. If you would like to use SSMS (SQL Server Management Studio) to query a SQLLocalDB, see below steps.


1. Find location of SqlLocalDB.exe, normally C:\Program Files\Microsoft SQL Server\[Version]\Tools\Binn 

2. Open cmd prompt in location;

3. run SqlLocalDB –?

4. run SqlLocalDB i

output:

5. Get Connection string:

run: SqlLocalDB i  MSSQLLocalDB

output

6. Copy Connection string: e.g:

np:\\.\pipe\LOCALDB#BBCAB010\tsql\query

7. Paste into SSMS:

example:

No comments:

Post a Comment