I have issue when i connect MSSQL with Node Red

this eror message :
16/05/2022, 13:40:01node: MSSQLmsg : Object

object

class: undefined

code: "EINSTLOOKUP"

lineNumber: undefined

message: "Failed to lookup instance on (localdb) - getaddrinfo ENOTFOUND (localdb)"

details: "Failed to lookup instance on (localdb) - getaddrinfo ENOTFOUND (localdb)"

name: "ConnectionError"

number: undefined

procName: undefined

serverName: undefined

state: undefined

toString: function

Which MSSQL node are you using (full name please)?
What authentication are you using?

I am using the SQL server authorized.

Steve was asking for the full name of the node. Something like node-red-contrib-?????

SELECT TOP (10) [ID]
,[dataItemId]
,[timestamp]
,[name]
,[sequnce]
,[subType]
,[Position_Text]
FROM [NodeRed2022].[dbo].[Position]

I see from the screenshot the OP is using node-red-contrib-mssql-plus

@Fathi2022

  • Are you definitely using sql server authentication ( NOT windows authentication )?

    • Please verify this by using another application to log in using SQL Server Authentication to verify your user name and password can actually log in
  • Can you show us a screen shot of the MSSQL config settings?

  • Is the SQL Server an instance? If yes...

    • what is the name of the instance?
    • did you enter the instance name in the MSSQL config settings?
    • Can you look in the SQL Server log and show be the instance port number assigned? (how to get port number of instance)
  • Where is the SQL Server installed - on same machine as node-red?

  • What version of SQL Server are you using?

I have verified this by using C# to save data in MSSQL.
I installed it on the same machine as node-red.
V18.11.1

if I would like to connect it by windows authorization is ok?
so no need to put the password is it right?

I've not tested that so cant answer - however SQL Server auth definately works.

PS: I cannot help you if you dont answer all questions

SQL Server Management Studio 15.0.18410.0

SSMS is of no interest

Can you just answer the questions I asked please otherwise I cannot help you.

    • what is the name of the instance? (LOCALDB#CEB49D9F)
  • did you enter the instance name in the MSSQL config settings? not yet.
  • Can you look in the SQL Server log and show the instance port number assigned? how can I get the port no, please?

Then it wont work - thats why I asked ...

... but you have still not showed me!



:point_down: Like in the link I provided ... :point_down:

:point_up_2: The "how to get port number of instance" link i posted 3 hours ago :point_up_2:

Yeah - that tells me absolutely nothing.

I need to see the MSSQL Config Node settings e.g...


I need to know the Instance Name e.g. my_sqlexpress_instance_01


I need to know the port number for the SQL instance e.g. 7801 or 1440 or ???? as described in the SQL Server Log

  1. I doubt your hostname is (localdb). Change this to the IP or hostname
  2. Is MSSQLLocalDB name of your SQL Server instance?
  3. As you are using an instance, I doubt 1433 is the correct port number. Please check like I showed you.