Reputation: 851
I have not had much luck with connecting to SQL Server using NTLM so far.
This is my config:
var config = {
"userName": "username",
"password": "password",
"domain": "domain"
"server": "server",
"options": {
"encrypt": true
}
}
I can log in to that server with domain\username and password, but I cannot authenticate using tedious. I tried out tedious-ntlm without much luck either. I don't even need windows authentication, btw. As long as tedious can talk to the domain and authenticate using provided username, I would be golden. I don't understand why it cannot communicate with the domain. I put the node.js script on the same server.
Upvotes: 0
Views: 1117
Reputation: 8763
NTLM or integrated security can only be used from a windows machine that is domain joined to the same (or trusted) domain as the SQL Server you are trying to access. Assuming your node.js script is running on a machine that is domain joined then your connection string (or config in this case) would replace the userName and password values with "IntegratedSecurity: true".
If the node.js script is running on a machine that is not domain joined then you can't use Integrated Security. You need to use SQL Auth as you are above. If that is not working then check that you have both a SQL Server Login as well as a Database User mapped to that login with access rights to the Database listed in your connection string.
Hope that helps.
Upvotes: 2