Closed na-am closed 3 years ago
Hi.
Can you show a screenshot of the working connection details from azure data studio and a screenshot of what you enter into the node connection setup?
Azure Data Studio query
Node-red settings:
Node-red and Data Studio are running on the same machine
You didnt show me the connection detail for Data Studio - never mind.
the port number is possibly not 1433
Look in the console for "listening"...
2021-07-07 09:29:11.38 spid19s Server is listening on [ 'any' <ipv6> 1433].
2021-07-07 09:29:11.38 spid19s Server is listening on [ 'any' <ipv4> 1433].
2021-07-07 09:29:11.39 Server Server is listening on [ ::1 <ipv6> 1434].
2021-07-07 09:29:11.40 Server Server is listening on [ 127.0.0.1 <ipv4> 1434].
If you cant find docker logs, then look in the sql log
Regarding instance name, you can use 'localhost\instance' to connect to named instance
this is the log from the docker container:
there is no port given in the settings of Data Studio:
this screenshot belongs to the windows client:
Hi, can you try 3 things please...
Disable Use Encryption, deploy, test.
Remove database name, , deploy, test.
Set host name to IP.ADD.RE.SS\MSSQLSERVER
, deploy, test.
Please be sure to deploy and test after each individual change.
Let me know how you get on.
Ta.
no success, BUT..... surprise, surprise with native node it's working :-) and yes, encrypt must be false otherwise no connection is possible
x = sql.connect('Server=10.6.0.89,1433;Database=ms;User Id=nodered;Password=xxx;Encrypt=false') Promise {
} console.dir(x) Promise { ConnectionPool { _events: [Object: null prototype] {}, _eventsCount: 0, _maxListeners: undefined, _connectStack: [], _closeStack: [], _connected: true, _connecting: false, _healthy: true, config: { options: [Object], pool: {}, port: 1433, server: '10.6.0.89', database: 'ms', domain: undefined, user: 'nodered', password: 'xxx', stream: false, parseJSON: false, arrayRowMode: false, validateConnection: true }, close: [Function: bound globalClose], pool: Pool { destroyed: false, emitter: [EventEmitter], creator: [Function: create], destroyer: [Function: bound _poolDestroy], validate: [Function: bound _poolValidate], log: [Function (anonymous)], acquireTimeoutMillis: 30000, createTimeoutMillis: 30000, destroyTimeoutMillis: 5000, idleTimeoutMillis: 30000, reapIntervalMillis: 1000, createRetryIntervalMillis: 200, propagateCreateError: true, min: 0, max: 10, used: [], free: [], pendingCreates: [], pendingAcquires: [], pendingDestroys: [], pendingValidations: [], interval: null, eventId: 1 }, } }
sorry for wasting your time Steve now it's working in Node-red encription=true was one reason AND a faulty syntax in my select statement :-(
No bother. Glad it's sorted.
Hi i've no success to connect to a linux ms sql server in a docker container besides, i can connect from a windows client to the ms sql server and also from Azure Data Studio (MacOS)
what i noticed is, that the windows client shows me no instance name for the linux ms sql server, just a servername (mssqlserver) that page says, that the linux version has no instance name: https://stackoverflow.com/questions/41695344/how-can-i-create-named-instance-of-microsoft-sql-server-on-ubuntu could that be the problem?
error msg with instance name 'mssqlserver': Failed to connect to ip\mssqlserver error msg w/o an instance name: invalid syntax near '-'.
thanks