问题
Currently I am developing the Node.js web app on my local Mint linux machine, and connect to a local SQL Server 2008 (express) via SQL Server Authentication by using this node module mssql. Everything is fine now.
But now I need to deploy the app to a Red Hat 6.4 (64bit) machine and SQL Server 2008 R2. I was given a Windows Authentication way to access the SQL Server. I can use the Windows Authentication via the Microsoft SQL Server Management Studio to see the database and create tables. But how I can connect the app on Red Hat to the SQL server via Node.js?
I have installed this MS ODBC Driver 11 for SQL Server on the Red Hat server. What should the next move be? or best practise.
回答1:
I just successfully connected to the SQL Server from Ubuntu 14.04.
I use FreeTDS as the driver, and unxiODBC as the driver manager, node odbc as the Node.js module to connect.
More information can see this link.
But I need to do more research, wondering if I can use the node module mssql to connect. mssql uses tds or tedious as drivers.
来源:https://stackoverflow.com/questions/26923765/how-to-connect-to-sql-server-from-red-hat-6-4-via-node-js