tediousjs / node-mssql

Microsoft SQL Server client for Node.js
https://tediousjs.github.io/node-mssql
MIT License
2.23k stars 466 forks source link

example connection string for remote sql server? #442

Closed r0zar closed 7 years ago

r0zar commented 7 years ago

I'm seeing some issues connecting to a remote sql server instance.

(node:13232) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): ConnectionError: Failed to connect to ***.**.**.**:1433 in 15000ms

var pool = sql.connect('mssql://***:***@***.**.**.**/SQLEXPRESS')

In SQL Server, the databases have a name in the MYSERVER/SQLEXPRESS format.

Do I use the first or second part of this for my connect string?

Thanks, RWR

JimiC commented 7 years ago

You probably need to enable the TCP/IP protocol.