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

Use msnodesqlv8 driver in Unix/Linux environment #1290

Closed
xiaoweiliu945 opened this issue Aug 10, 2021 · 1 comment
Closed

Use msnodesqlv8 driver in Unix/Linux environment #1290

xiaoweiliu945 opened this issue Aug 10, 2021 · 1 comment

Comments

@xiaoweiliu945
Copy link

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:
@dhensby
Copy link
Collaborator

dhensby commented Aug 19, 2021

PRs welcome.

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

No branches or pull requests

2 participants