Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to connect to LocalDB (Sql Server)? #61

Closed
4 of 7 tasks
gpuma opened this issue Jan 30, 2018 · 1 comment
Closed
4 of 7 tasks

How to connect to LocalDB (Sql Server)? #61

gpuma opened this issue Jan 30, 2018 · 1 comment

Comments

@gpuma
Copy link

gpuma commented Jan 30, 2018

This is a guideline to help us to understand SQLTools Issues.

You don't need to stick to this, but please try to guide us to reproduce the errors or understand your feature requests.

Issue Type

  • Feature Request
  • Bugfix/Errors
  • Questions
  • Other

Prerequisites (For bugfixes)

  • Are you running the latest version?
  • Did you check the logs?
  • Did you check the Setup?

Description

(Running v0.11.4)

Hello, how can I connect to a LocalDB SQL server instance? Using the following config gives me a connection error:

"sqltools.connections": [
        {
            "name": "MSSQL",
            "server": "127.0.0.1",
            "dialect": "MSSQL",
            "port": 1433,
            "database": "EFGetStarted.AspNetCore.NewDb",
            "username": "sa",
            "askForPassword": false,
            "password": null,
            "connectionTimeout": 30
        }
    ]

This database was created using Entity Framework Core, so, AFAIK there's no password or username, at least explicitly. The following connection string works for me if I want to connect using Visual Studio 2017 data tools:

Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\User\Gus\EFGetStarted.AspNetCore.NewDb.mdf;Integrated Security=True;Connect Timeout=30

And this is the actual connection string used by EF Core: @"Server=(localdb)\mssqllocaldb;Database=EFGetStarted.AspNetCore.NewDb;Trusted_Connection=True;ConnectRetryCount=0";

Thank you for your time.

@art-ist
Copy link

art-ist commented Mar 31, 2018

Looks like you are using tedious to connect to MS SQL? If my impression is correct, you'l have two problems:

  • tedious doesen't seem to support Integrated Security (=Trusted_Connection) thus only Sql Logins would work. see issue 306
  • tedious doesen't seem to support named pipes. see issue 348

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants