tediousjs / tedious

Node TDS module for connecting to SQL Server databases.
http://tediousjs.github.io/tedious/
MIT License
1.58k stars 439 forks source link

MSSQL Connection problem #1602

Open Kutubkhan-Makda opened 9 months ago

Kutubkhan-Makda commented 9 months ago

Question

How to connect with mssql in window's with window authentication which does not have username and password there is no windows authentication type.

MichaelSun90 commented 9 months ago

Hi @MKhan1792 , unfortunately, tedious does not natively support window authentication without username and password. You can check here under authentication types for all the available authentication types and details on how to connection with them.

arthurschreiber commented 9 months ago

Nowadays, koffi and https://github.com/node-ffi-napi/node-ffi-napi allow writing nodejs libraries that can call out to libraries written in C and other languages without having to write a native NodeJS extension. This could be one possibility to provide support for this on Windows.

lroal commented 7 months ago

You can use msnodesqlv8 for windows authentication. Alternatively, you can use rdb ORM that supports both tedious and msnodesqlv8. Just use rdb.mssqlNative(..) instead of rdb.mssql(...) and install msnodesqlv8 first. You can use raw queries with it as well as model mappings. I am the author of rdb.