MSSQL Windows Authentication Connection in config/database.ts #2262
Replies: 4 comments 1 reply
-
@celestialvigor Can you share what exactly Windows authentication is or link to some docs? |
Beta Was this translation helpful? Give feedback.
-
IIRC node-mssql has issues connecting using windows auth. You need to specify a different driver that's able to collect the logged in user details, tedious doesn't appear to do it. Also there some issues around connecting to SQL Server Express with windows auth and node-mssql. Try something like below in your config, I'm not overly hopeful it will work. Making a login in the engine/schema is the way forward. You'll get nothing but pain using this connection method, not to mention the security implications.
|
Beta Was this translation helpful? Give feedback.
-
This is a know issue in knex 3376 There's a pr that adress the driver that can perform windows authentication, but is frozen 3806 |
Beta Was this translation helpful? Give feedback.
-
After some days with this problem i've found the solution. Just add
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to connect to an MSSQL server which possesses a named instance (SQLEXPRESS) through Windows authentication.
The below code in
config/database.ts
works for the TCP/IP connection.What would I need to change in order to switch the connection method to Windows authentication?
Beta Was this translation helpful? Give feedback.
All reactions