I'm connecting to a db using a node app. Node app will connect fine for most dbs. However, I'm having an issue with a db that has both the named instance and port defined, but can't find a way to connect using mssql. I can connect to db directly using SSMS.
I notice in the docs it suggests the two are incompatible:
'port - Port to connect to (default: 1433). Don't set when connecting to named instance.'
Expected behaviour:
I'm connecting to a db using a node app. Node app will connect fine for most dbs. However, I'm having an issue with a db that has both the named instance and port defined, but can't find a way to connect using mssql. I can connect to db directly using SSMS.
I notice in the docs it suggests the two are incompatible: 'port - Port to connect to (default: 1433). Don't set when connecting to named instance.'
Right now I'm doing something like this:
const sqlConfig = { user: process.env.user, password: process.env.password, database: process.env.dbname, server: 'servername.com/namedinstance01', pool: { max: 10, min: 0, idleTimeoutMillis: 30000 }, options: { port: 01234 } }
Actual behaviour:
I would expect to be able to connect using this named instance + port, but I get a connection error
Software versions
Is it possible to connect to a db defined with both named instance and port?