I am trying to remotely connect to a Microsoft SQL Server from Node (using node-mssql).
var sql = require('mssql')
var config = {
server: '**',
user: '**',
password: '**!',
database: '**'
}
sql.connect(config, function(err) {
var request = new sql.Request()
request.query("select *", function(err, recordset) {
console.log(err)
console.log(recordset)
})
console.log('end')
})
I ran the following query from the server:
SELECT
CONNECTIONPROPERTY('net_transport') AS net_transport,
CONNECTIONPROPERTY('protocol_type') AS protocol_type,
CONNECTIONPROPERTY('auth_scheme') AS auth_scheme,
CONNECTIONPROPERTY('local_net_address') AS local_net_address,
CONNECTIONPROPERTY('local_tcp_port') AS local_tcp_port,
CONNECTIONPROPERTY('client_net_address') AS client_net_address
based on SQL - Query to get server's IP address
Do I use the client_net_address
to remote connect, or some other IP for the server
parameter?