# I have issue when i connect MSSQL with Node Red

**URL:** https://discourse.nodered.org/t/i-have-issue-when-i-connect-mssql-with-node-red/62691
**Category:** General
**Tags:** node-red-dashboard
**Created:** [16 May 2022 12:42 UTC](https://discourse.nodered.org/t/i-have-issue-when-i-connect-mssql-with-node-red/62691 "2022-05-16T12:42:24Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Fathi2022](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@Fathi2022](https://discourse.nodered.org/u/Fathi2022)
#### Post date: [16 May 2022 12:42 UTC](https://discourse.nodered.org/t/i-have-issue-when-i-connect-mssql-with-node-red/62691/1 "2022-05-16T12:42:24Z")

</div>

this eror message :  
16/05/2022, 13:40:01[node: MSSQL](http://127.0.0.1:1880/#)msg : 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

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [16 May 2022 13:04 UTC](https://discourse.nodered.org/t/i-have-issue-when-i-connect-mssql-with-node-red/62691/2 "2022-05-16T13:04:09Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Fathi2022](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@Fathi2022](https://discourse.nodered.org/u/Fathi2022)
#### Post date: [16 May 2022 13:22 UTC](https://discourse.nodered.org/t/i-have-issue-when-i-connect-mssql-with-node-red/62691/3 "2022-05-16T13:22:46Z")

</div>

I am using the SQL server authorized.

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [16 May 2022 14:09 UTC](https://discourse.nodered.org/t/i-have-issue-when-i-connect-mssql-with-node-red/62691/4 "2022-05-16T14:09:34Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Fathi2022](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@Fathi2022](https://discourse.nodered.org/u/Fathi2022)
#### Post date: [16 May 2022 14:39 UTC](https://discourse.nodered.org/t/i-have-issue-when-i-connect-mssql-with-node-red/62691/5 "2022-05-16T14:39:43Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/9/b9871be2a233baf4c250759c0932ce6c43c266df.png)

---

<div class="post-metadata">

### Author: ![Fathi2022](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@Fathi2022](https://discourse.nodered.org/u/Fathi2022)
#### Post date: [16 May 2022 14:40 UTC](https://discourse.nodered.org/t/i-have-issue-when-i-connect-mssql-with-node-red/62691/6 "2022-05-16T14:40:40Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [16 May 2022 14:45 UTC](https://discourse.nodered.org/t/i-have-issue-when-i-connect-mssql-with-node-red/62691/7 "2022-05-16T14:45:30Z")

</div>

> [@zenofmud](#):
>
> Steve was asking for the full name of the node

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 )?

- Can you show us a screen shot of the MSSQL config settings?

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

- Where is the SQL Server installed - on same machine as node-red?

- What version of SQL Server are you using?

---

<div class="post-metadata">

### Author: ![Fathi2022](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@Fathi2022](https://discourse.nodered.org/u/Fathi2022)
#### Post date: [16 May 2022 15:21 UTC](https://discourse.nodered.org/t/i-have-issue-when-i-connect-mssql-with-node-red/62691/8 "2022-05-16T15:21:00Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Fathi2022](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@Fathi2022](https://discourse.nodered.org/u/Fathi2022)
#### Post date: [16 May 2022 15:25 UTC](https://discourse.nodered.org/t/i-have-issue-when-i-connect-mssql-with-node-red/62691/9 "2022-05-16T15:25:15Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [16 May 2022 15:27 UTC](https://discourse.nodered.org/t/i-have-issue-when-i-connect-mssql-with-node-red/62691/10 "2022-05-16T15:27:38Z")

</div>

> [@Fathi2022](#):
>
> I would like to connect it by windows authorization is ok

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

> [@Steve-Mcl](#):
>
> Can you show us a screen shot of the MSSQL config settings?

> [@Steve-Mcl](#):
>
> 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](https://www.mssqltips.com/sqlservertip/2495/identify-sql-server-tcp-ip-port-being-used/))

> [@Steve-Mcl](#):
>
> What version of SQL Server are you using?

---

<div class="post-metadata">

### Author: ![Fathi2022](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@Fathi2022](https://discourse.nodered.org/u/Fathi2022)
#### Post date: [16 May 2022 15:29 UTC](https://discourse.nodered.org/t/i-have-issue-when-i-connect-mssql-with-node-red/62691/11 "2022-05-16T15:29:22Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/6/66d276f04eefc8878a52c1ea02b56576be4e1f7d.png)

SQL Server Management Studio 15.0.18410.0

---

<div class="post-metadata">

### Author: ![Fathi2022](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@Fathi2022](https://discourse.nodered.org/u/Fathi2022)
#### Post date: [16 May 2022 15:30 UTC](https://discourse.nodered.org/t/i-have-issue-when-i-connect-mssql-with-node-red/62691/12 "2022-05-16T15:30:09Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/3/b363eec834538ab8edcdc63a9dccacf3580b63c8.png)

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [16 May 2022 15:30 UTC](https://discourse.nodered.org/t/i-have-issue-when-i-connect-mssql-with-node-red/62691/13 "2022-05-16T15:30:55Z")

</div>

> [@Fathi2022](#):
>
> 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.

---

<div class="post-metadata">

### Author: ![Fathi2022](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@Fathi2022](https://discourse.nodered.org/u/Fathi2022)
#### Post date: [16 May 2022 15:32 UTC](https://discourse.nodered.org/t/i-have-issue-when-i-connect-mssql-with-node-red/62691/14 "2022-05-16T15:32:03Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/2/62b7ff846998cc5a9bb8b29743bc093ca0ae1867.png)

---

<div class="post-metadata">

### Author: ![Fathi2022](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@Fathi2022](https://discourse.nodered.org/u/Fathi2022)
#### Post date: [16 May 2022 17:29 UTC](https://discourse.nodered.org/t/i-have-issue-when-i-connect-mssql-with-node-red/62691/15 "2022-05-16T17:29:24Z")

</div>

- 
  - 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?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [16 May 2022 17:33 UTC](https://discourse.nodered.org/t/i-have-issue-when-i-connect-mssql-with-node-red/62691/16 "2022-05-16T17:33:40Z")

</div>

> [@Fathi2022](#):
>
> did you enter the instance name in the MSSQL config settings? not yet.

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

> [@Steve-Mcl](#):
>
> Can you show us a screen shot of the MSSQL config settings?

... but you have still not showed me!

> [@Fathi2022](#):
>
> Can you look in the SQL Server log and show the instance port number assigned? how can I get the port no, please

👇 Like in the link I provided ... 👇

> [@Steve-Mcl](#):
>
> Can you look in the SQL Server log and show be the instance port number assigned? ([how to get port number of instance](https://www.mssqltips.com/sqlservertip/2495/identify-sql-server-tcp-ip-port-being-used/))

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

---

<div class="post-metadata">

### Author: ![Fathi2022](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@Fathi2022](https://discourse.nodered.org/u/Fathi2022)
#### Post date: [16 May 2022 17:52 UTC](https://discourse.nodered.org/t/i-have-issue-when-i-connect-mssql-with-node-red/62691/17 "2022-05-16T17:52:40Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/7/d7b2747372578231e0bba18e12bbada9ed473a8c.png)

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [16 May 2022 18:04 UTC](https://discourse.nodered.org/t/i-have-issue-when-i-connect-mssql-with-node-red/62691/18 "2022-05-16T18:04:30Z")

</div>

Yeah - that tells me absolutely nothing.

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

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/f/0f5d5534aa476a8da148adfe7a7d06a782a09bf9.png)

  

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

---

<div class="post-metadata">

### Author: ![Fathi2022](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@Fathi2022](https://discourse.nodered.org/u/Fathi2022)
#### Post date: [17 May 2022 13:25 UTC](https://discourse.nodered.org/t/i-have-issue-when-i-connect-mssql-with-node-red/62691/19 "2022-05-17T13:25:20Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/0/604323065b4929e5c86adb34c6d0a2a4af354845.png)

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [17 May 2022 14:29 UTC](https://discourse.nodered.org/t/i-have-issue-when-i-connect-mssql-with-node-red/62691/20 "2022-05-17T14:29:15Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/a/4a1338ac0678248e50e1d1e32269dfc2896fd5fe.png)

[Next page](https://discourse.nodered.org/t/i-have-issue-when-i-connect-mssql-with-node-red/62691.md?page=2)
