Page 1 of 1

How to connect to LocalDb?

Posted: Tue 07 Nov 2017 10:15
by structed
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

Re: How to connect to LocalDb?

Posted: Tue 07 Nov 2017 13:20
by alexa
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.

Re: How to connect to LocalDb?

Posted: Wed 08 Nov 2017 15:03
by structed
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

Re: How to connect to LocalDb?

Posted: Wed 08 Nov 2017 15:20
by alexa
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

Re: How to connect to LocalDb?

Posted: Wed 08 Nov 2017 16:50
by structed
Just figured exactly that - and it worked. Thank you!

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

Re: How to connect to LocalDb?

Posted: Wed 08 Nov 2017 17:21
by alexa
Thank you for updating us on this issue.

Please let us know if any questions arise.