How to connect to LocalDb?

Discussion of open issues, suggestions and bugs regarding database management and development tools for SQL Server
Post Reply
structed
Posts: 11
Joined: Tue 07 Nov 2017 10:07

How to connect to LocalDb?

Post by structed » Tue 07 Nov 2017 10:15

How can I connect to a LocalDb (installed with Visual Studio 2017) in dbForge (Express)? The connection string I use, e.g. for my application, is not working. Nor can I seem to configure this properly using the UI

alexa

Re: How to connect to LocalDb?

Post by alexa » Tue 07 Nov 2017 13:20

Please try specifying the following:

Code: Select all

(localdb)\v13.0
where v13.0 is a database name.

You can view the list of localDB with the following command Image

If this doesn't help. Please provide us a screenshot of the error.

structed
Posts: 11
Joined: Tue 07 Nov 2017 10:07

Re: How to connect to LocalDb?

Post by structed » Wed 08 Nov 2017 15:03

The output on my machine looks quite different - and I can't seem to find out what exactly I should use after the

Code: Select all

local\
part...

Code: Select all

C:\Users\Structed>"C:\Program Files\Microsoft SQL Server\130\Tools\Binn\SqlLocalDB.exe" info MSSQLLocalDB
Name:               MSSQLLocalDB
Version:            13.1.4001.0
Shared name:
Owner:              MININT-33U61DV\Structed
Auto-create:        Yes
State:              Running
Last start time:    07/11/2017 11:15:53
Instance pipe name: np:\\.\pipe\LOCALDB#5A2B8B2B\tsql\query

alexa

Re: How to connect to LocalDb?

Post by alexa » Wed 08 Nov 2017 15:20

Please specify the following in the 'Server' field on the 'General' tab of the Database Connection Properties dialog box (right-click the connection in Database Explorer and select 'Modify Connection...' from the popup menu):

Code: Select all

(localdb)\MSSQLLocalDB

structed
Posts: 11
Joined: Tue 07 Nov 2017 10:07

Re: How to connect to LocalDb?

Post by structed » Wed 08 Nov 2017 16:50

Just figured exactly that - and it worked. Thank you!

Side note: I specified "Windows Authentication" as Authentication method - which seemed to work.

alexa

Re: How to connect to LocalDb?

Post by alexa » Wed 08 Nov 2017 17:21

Thank you for updating us on this issue.

Please let us know if any questions arise.

Post Reply