Which IP to Use to Remote Connect to SQL Server?

247
December 24, 2017, at 2:16 PM

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?

READ ALSO
How to run a angular web app with express?

How to run a angular web app with express?

I'm having a problem with a Angularjs (v1) project with express server, when It start show me this error and where It show "ng-view" is blank, but the controller work fine,also I did run the code on apache server and It works, but when I use with express...

279
Enable sourcemaps in Chrome DevTools

Enable sourcemaps in Chrome DevTools

I am trying to debug my nodejs application

258
Node-Sass can't find python even if it is instaleld

Node-Sass can't find python even if it is instaleld

So when I run npm install node-sass for an application, i get the following error: Full log found here:

227