Node-mssql: Cannot connect to local DB with instance name

Created on 27 Feb 2016  路  3Comments  路  Source: tediousjs/node-mssql

Hello,

First of all, thank you for this library it looks good and is very simple to use.

I am encountering an issue when using the tedious driver with named instances.
Here is my configuration :

var config = {
    user: 'sa',
    password: 'mypassword',
    server: 'localhost\\SQLSERVER_2014',
    database: 'TestDB',
    options: {
        encrypt: false
    }
}; 

With the same configuration, I am able to connect with msnodesqlv8.
Is it better to use tedious, if yes why? Is there anything wrong with the configuration?

Find the attached error with the tedious driver :

{ [ConnectionError: Failed to connect to localhost:undefined in 15000ms]
  name: 'ConnectionError',
  message: 'Failed to connect to localhost:undefined in 15000ms',
  code: 'ETIMEOUT' }

I tried to look at the code myself but I am not familiar enough with it for now to find where the error could be located.

Thanks

discussion

Most helpful comment

Hello,

I was facing the same issue, and finally I've found the solution :

try this :

Finally restart 'SQL Server' and 'SQL Browser Agent' services

All 3 comments

Hello,

I was facing the same issue, and finally I've found the solution :

try this :

Finally restart 'SQL Server' and 'SQL Browser Agent' services

Closing due to inactivity.

That helped!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andrewmcgivery picture andrewmcgivery  路  5Comments

baekft picture baekft  路  5Comments

AlexSenchenko picture AlexSenchenko  路  6Comments

Halt001 picture Halt001  路  3Comments

jeetendra-choudhary picture jeetendra-choudhary  路  3Comments