# Keine Verbindung zum SQL Server 2019

**URL:** <https://discourse.nodered.org/t/keine-verbindung-zum-sql-server-2019/53985>\
**Category:** General\
**Tags:** database\
**Created:** [19 November 2021 10:14 UTC](https://discourse.nodered.org/t/keine-verbindung-zum-sql-server-2019/53985 "2021-11-19T10:14:25Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![SENR](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@SENR](https://discourse.nodered.org/u/SENR)\
**Post date:** [19 November 2021 10:14 UTC](https://discourse.nodered.org/t/keine-verbindung-zum-sql-server-2019/53985/1 "2021-11-19T10:14:25Z")

</div>

Deutsch:  
Ich bekomme keine Verbindung mit dem SQL-Server 2019 EXPRESS. Habe einen simplen Flow erstellt, der auf einen Tastendruck eine Anfrage einer Funktion in die MSSQL Funktion übergibt. Ich erhalte immer den Fehler:  
"ConnectionError: Failed to lookup instance on DESKTOP-7R5OQBV:1433 - getaddrinfo ENOTFOUND DESKTOP-7R5OQBV:1433"

Die Serveradresse habe ich aus dem SQL-Server herauskopiert.  
DESKTOP-7R5OQBV:1433\SQLEXPRESS01

Habe es schon mit 127.0.0.1, localhost, mit und ohne Port (ohne gibt es einen undefined Port Fehler), mit Encryption und ohne ...

Ich lasse den SQL-Server auf dem gleichen Rechner laufen, wie Node-RED.  
Den Server-Browser habe ich gestartet, die Sicherheit auf Server+Windows-Authorisierung gestellt, den Server mehrfach neu gestartet ...

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/c/0c5eb54409840d0b242990bad3a8f06486a608e2.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/d/9dcd5d92b9442b94b83703b9b3909ebbab6141fd.png)

Danke für Eure Hilfe!

English:  
I can't get a connection to the SQL Server 2019 EXPRESS. Have created a simple flow that passes a request from a function into the MSSQL function on a keystroke. I always get the error:  
"ConnectionError: Failed to lookup instance on DESKTOP-7R5OQBV:1433 - getaddrinfo ENOTFOUND DESKTOP-7R5OQBV:1433"

I copied the server address from the SQL server.  
DESKTOP-7R5OQBV:1433\SQLEXPRESS01

Have already tried it with 127.0.0.1, localhost, with and without port (without it gives an undefined port error), with Encryption and without ...

I run the SQL server on the same machine as Node-RED.  
I started the server browser, set the security to Server+Windows Authorization, restarted the server several times ...

Thanks for your help!  
Steffen

---

<div class="post-metadata">

**Author:** ![stilicrafter](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stilicrafter/32/51332_2.png) [@stilicrafter](https://discourse.nodered.org/u/stilicrafter)\
**Post date:** [19 November 2021 16:30 UTC](https://discourse.nodered.org/t/keine-verbindung-zum-sql-server-2019/53985/2 "2021-11-19T16:30:30Z")

</div>

Welche Einstellungen hast du auf der SQL Node getätigt?

---

<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:** [19 November 2021 16:53 UTC](https://discourse.nodered.org/t/keine-verbindung-zum-sql-server-2019/53985/3 "2021-11-19T16:53:58Z")

</div>

> [@SENR](#):
>
> I started the server browser, set the security to Server+Windows Authorization

You might have to [enable sql server authentication](https://www.dundas.com/support/learning/documentation/installation/how-to-enable-sql-server-authentication) on SQL server & add an account.

then try this...

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

* * *

PS: This uses the newer & supported [node-red-contrib-mssql-plus](https://flows.nodered.org/node/node-red-contrib-mssql-plus)

---

<div class="post-metadata">

**Author:** ![SENR](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@SENR](https://discourse.nodered.org/u/SENR)\
**Post date:** [22 November 2021 07:32 UTC](https://discourse.nodered.org/t/keine-verbindung-zum-sql-server-2019/53985/4 "2021-11-22T07:32:33Z")

</div>

Hello,  
first of all, thank you very much for the feedback.  
Unfortunately it still does not work.  
I have now uninstalled mssql and then installed mssql-plus.  
Here are my settings and the current error:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/c/ec3084382279a95d7a957264f3a0b229191ef2a5.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/1/61fa81426cdeffb1f4d2ba23abdd0e13d2738fa4.png)

I can't find an approach (I guess I lack the expertise here) on how to find the error. Is it possible that it is the wrong port? I have found it on the Internet. Is it possible to read it in the SQL server? I also tried 127.0.0.1 - without success =\> same message.

Thank you very much!

---

<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:** [22 November 2021 14:07 UTC](https://discourse.nodered.org/t/keine-verbindung-zum-sql-server-2019/53985/5 "2021-11-22T14:07:27Z")

</div>

> [@SENR](#):
>
> Is it possible that it is the wrong port

Yes. This is often the case with named instances. You need to look in the SQL log.

Loads of information on the net regarding this. E.g....

"How to find the TCP Port number your SQL Instance is listening on | Popdock" [How to Find the TCP Port Number your SQL Instance is Listening on - eOne Solutions](https://popdock.com/knowledge-base/how-to-find-the-tcp-port-number-your-sql-instance-is-listening-on/)

---

<div class="post-metadata">

**Author:** ![SENR](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@SENR](https://discourse.nodered.org/u/SENR)\
**Post date:** [22 November 2021 15:20 UTC](https://discourse.nodered.org/t/keine-verbindung-zum-sql-server-2019/53985/6 "2021-11-22T15:20:13Z")

</div>

Hello,

thank you very much, this has given some push towards success.  
a) I have noticed that in the Config Manager, TCP was on inactive, I have now changed to active.  
b) Under all IPs, no port was entered - I have now entered the 1433 at IP8: 127.0.0.1.

Then I restarted the server and retriggered my command. Now I get stuck at the next point. I have tried there now 2 hours around. Now the error comes:

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

I created the user NODERED in the security of the SQL server:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/2/82d17b7d3b62519ae9bf43d3b01bcfa64a8fc4ae.png)

Can it be that some other basic settings or basic parameters are missing?

BR

---

<div class="post-metadata">

**Author:** ![SENR](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@SENR](https://discourse.nodered.org/u/SENR)\
**Post date:** [22 November 2021 15:32 UTC](https://discourse.nodered.org/t/keine-verbindung-zum-sql-server-2019/53985/7 "2021-11-22T15:32:06Z")

</div>

Perhaps this ist helpfull?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/2/42fa5e6bdb22b5808122b455e4b799a6f52d441d.png)  
What does it mean?

---

<div class="post-metadata">

**Author:** ![SENR](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@SENR](https://discourse.nodered.org/u/SENR)\
**Post date:** [24 November 2021 08:17 UTC](https://discourse.nodered.org/t/keine-verbindung-zum-sql-server-2019/53985/8 "2021-11-24T08:17:39Z")

</div>

I just can't get on, I have searched the internet and find many hits, but can't do anything with the topics discussed.  
If no one can help me here, then I try to find a SQL forum.  
Thanks a lot for the help so far. If someone still has an idea or I should show anything, then please feel free to write.  
THANKS!

---

<div class="post-metadata">

**Author:** ![SENR](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@SENR](https://discourse.nodered.org/u/SENR)\
**Post date:** [24 November 2021 09:22 UTC](https://discourse.nodered.org/t/keine-verbindung-zum-sql-server-2019/53985/9 "2021-11-24T09:22:36Z")

</div>

I did it, the error is gone. I deleted the user and then created a new one.

Now the error comes:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/b/6b3bfb0e14f61b131f0e24cc8d61099d9b1006f2.png)

Seems to be related to the STRING content, now I have to see how to make a STRING - more STRING. If anyone knows the solution - am grateful for any help that shortens my search.

---

<div class="post-metadata">

**Author:** ![SENR](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@SENR](https://discourse.nodered.org/u/SENR)\
**Post date:** [24 November 2021 09:58 UTC](https://discourse.nodered.org/t/keine-verbindung-zum-sql-server-2019/53985/10 "2021-11-24T09:58:25Z")

</div>

Hello,

Problem solved.  
Thanks to all who helped me.  
Result: lack of basic knowledge.  
I have still manually adjusted the user rights in the server. Here the access permission to the table was missing. Also a ' at the beginning and end of the string was missing.

Greetings

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [8 December 2021 09:59 UTC](https://discourse.nodered.org/t/keine-verbindung-zum-sql-server-2019/53985/11 "2021-12-08T09:59:21Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
