Skip to content

Use msnodesqlv8 driver in Unix/Linux environment #1290

@xiaoweiliu945

Description

@xiaoweiliu945

Expected behaviour:

Using msnodesqlv8 driver in Unix/Linux environment

Actual behaviour:

The msnodesqlv8 now support Unix/Linux, and SQL Server Native Client 11.0 is a windows only driver and should not be hard-coded in connection-pool.js

Configuration:

const CONNECTION_STRING_PORT = 'Driver=SQL Server Native Client 11.0;Server=#{server},#{port};Database=#{database};Uid=#{user};Pwd=#{password};Trusted_Connection=#{trusted};Encrypt=#{encrypt};'
const CONNECTION_STRING_NAMED_INSTANCE = 'Driver=SQL Server Native Client 11.0;Server=#{server}\\#{instance};Database=#{database};Uid=#{user};Pwd=#{password};Trusted_Connection=#{trusted};Encrypt=#{encrypt};'

I have to replace the driver with ODBC Driver 17 for SQL Server in order to make it work for msnodesqlv8 in mac

const CONNECTION_STRING_PORT = 'Driver=ODBC Driver 17 for SQL Server;Server=#{server},#{port};Database=#{database};Uid=#{user};Pwd=#{password};Trusted_Connection=#{trusted};Encrypt=#{encrypt};'
const CONNECTION_STRING_NAMED_INSTANCE = 'Driver=ODBC Driver 17 for SQL Server;Server=#{server}\\#{instance};Database=#{database};Uid=#{user};Pwd=#{password};Trusted_Connection=#{trusted};Encrypt=#{encrypt};'

Software versions

  • NodeJS:
  • node-mssql:
  • SQL Server:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions