I am trying to use sequelize cli with the sequelize-auto package to read an existing MSSQL database schema in order to scaffold out the models for each table.
However I am stuck on a 'ConnectionError: Failed to connect to [myDatabse FQDN]:1433 - socket hang up'.
I have another MSSQL node.js app that connects fine using /mssql/msnodesqlv8, so I feel fairly sure this is not a problem with the database server end, and all connection parameters being passed are the same for both apps.
The sequelize documentation requires tedious (which is installed), and sequelize-auto github docs seem to suggest the msssql module as the connection method (also installed), so it's not particularly clear which is being used and whether I need to manually configure anything within them such as time-out settings.
Given the sequelize modules are intended to be the top level configuration where database details are entered and simply leverage whatever is needed from the mssql connector modules once 'mssql' is passed as the dialect option, I'm not really sure where to start.
Any help greatly appreciated!
Some additional info : Have successfully tested connection with sequelize module in conjunction with tedious using the snippet from the 'sequelize getting-started' documentation:
try {
await sequelize.authenticate();
console.log('Connection has been established successfully.');
} catch (error) {
console.error('Unable to connect to the database:', error);
}
Then tried to repeat connection test just using tedious, this failed with the same socket-hang up error. Also tried using the API code from the sequelize-auto documentation (had been using the CLI before) but still the same socket hang up error.
If your Nodejs is 6.3 or higher and SQL server 2005. Your database config should be: