Having completed the SQL Server installer, the given connection string is Server=localhost\\MSSQLSERVER01;Database=master;Trusted_Connection=True;
, which seems
Based on this article you should install sequelize-msnodesqlv8:
var sequelize = new Sequelize({
dialect: 'mssql',
dialectModulePath: 'sequelize-msnodesqlv8',
dialectOptions: {
instanceName: 'MSSQLSERVER01',
trustedConnection: true
},
host: 'localhost',
database: 'master'
});
or perhaps better:
var sequelize = new Sequelize({
dialect: 'mssql',
dialectModulePath: 'sequelize-msnodesqlv8',
dialectOptions: {
connectionString: 'Server=localhost\MSSQLSERVER01;Database=master; Trusted_Connection=yes;'
},
});
But you should not leave default database as Master
. Use your database name instead.
Mark this:
There are many node mssql clients and sequelize defaults to using tedious, but being pure javascript,tedious lacks support for integrated security. msnodesqlv8 is a client that interfaces with a native odbc library. This allows integrated security to be used. It does require additional binaries to deploy, but fortunately, msnodesqlv8 is distributed with binaries for the most common architectures
You are using integrated security, so you need to deal with that problem.
See also this question.