Skip to content
Advertisement

Connect to local SQL Server with Sequelize

I recently set up a Local SQL Server Db for development of my node app. I’m having trouble trying to connect to it from my node app.

I was able to connect with sqlcmd using the command:

I’m using the Sequelize cli in an attempt to run a migration on my development database.

my config.json is as follows:

I changed the name from EXPRESS to LOCALSERVER when I set it up (don’t ask me why). I also set up it up to login with Windows authentication and SQL SERVER logins. I’ve gotten a variety of errors with the various configs I’ve tried, most recently:

I think I may not be understanding what values from SQL Server I should be passing to Sequelize. Where can I find the logs and view the actual connection string being used?

Advertisement

Answer

I ended up having to use sequelize-msnodesqlv8 since I am using sqlserver, that is the only way to authenticate with windows. My final connection config object looked like this:

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement