# Can Node Mssql running in many flow?

**URL:** https://discourse.nodered.org/t/can-node-mssql-running-in-many-flow/93954
**Category:** General
**Created:** [17 December 2024 09:25 UTC](https://discourse.nodered.org/t/can-node-mssql-running-in-many-flow/93954 "2024-12-17T09:25:24Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![riimeister](https://avatars.discourse-cdn.com/v4/letter/r/ac8455/32.png) [@riimeister](https://discourse.nodered.org/u/riimeister)
#### Post date: [17 December 2024 09:25 UTC](https://discourse.nodered.org/t/can-node-mssql-running-in-many-flow/93954/1 "2024-12-17T09:25:24Z")

</div>

Can this mssql node run if installed in 1 flow? if for example I have 9 flows then there will be 9 mssql nodes running at the same time

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/1/a1fe905dc1539fa4fb5dd37dfa58cc30cdcf442b.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 December 2024 12:46 UTC](https://discourse.nodered.org/t/can-node-mssql-running-in-many-flow/93954/2 "2024-12-17T12:46:16Z")

</div>

> [@riimeister](#):
>
> this mssql

Which one. There is the old, unmaintained , buggy, feature-less `node-red-contrib-mssql` and there is the buch better , more stable, more capable, maintained `node-red-contrib-mssql-plus` (and a few others)

> [@riimeister](#):
>
> if for example I have 9 flows then there will be 9 mssql nodes running at the same time

You could, but if they operate at exactly the same time you might run into concurrency issues due to lack of transactions.

The better solution would be to put one mssql node inside of a subroutine (using link nodes and the link-call node)

---

<div class="post-metadata">

### Author: ![riimeister](https://avatars.discourse-cdn.com/v4/letter/r/ac8455/32.png) [@riimeister](https://discourse.nodered.org/u/riimeister)
#### Post date: [18 December 2024 01:08 UTC](https://discourse.nodered.org/t/can-node-mssql-running-in-many-flow/93954/3 "2024-12-18T01:08:39Z")

</div>

currently i use node-red-contrib-mssql and will probably move to mssql-plus

hmm, what is an example of a link node for calling and inputting MSSQL?

---

<div class="post-metadata">

### Author: ![riimeister](https://avatars.discourse-cdn.com/v4/letter/r/ac8455/32.png) [@riimeister](https://discourse.nodered.org/u/riimeister)
#### Post date: [18 December 2024 02:52 UTC](https://discourse.nodered.org/t/can-node-mssql-running-in-many-flow/93954/4 "2024-12-18T02:52:15Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/0/f0aba6cb0d68b5d5d81d423d65b45882d88654d6.png)  
link out and link in like this? looks like it works

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [18 December 2024 05:32 UTC](https://discourse.nodered.org/t/can-node-mssql-running-in-many-flow/93954/5 "2024-12-18T05:32:04Z")

</div>

This is the concept:

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

1. link-in node. Make sure to give it a proper name (eg. db)
2. link-out node. Set the mode to: 'return to calling link node'
3. link-call node. select the name you gave to 1.

Now you can pass a query and call the db directly in your flows by only using the link-call node.

---

<div class="post-metadata">

### Author: ![riimeister](https://avatars.discourse-cdn.com/v4/letter/r/ac8455/32.png) [@riimeister](https://discourse.nodered.org/u/riimeister)
#### Post date: [18 December 2024 06:30 UTC](https://discourse.nodered.org/t/can-node-mssql-running-in-many-flow/93954/6 "2024-12-18T06:30:21Z")

</div>

I made it like this, is it working properly?

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

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [18 December 2024 06:33 UTC](https://discourse.nodered.org/t/can-node-mssql-running-in-many-flow/93954/7 "2024-12-18T06:33:37Z")

</div>

'Usually' you want to do something with the output of your query, this is the reason why it is suggested to use a link-call node so that you can process the output - as the output is returned.

Now you are performing queries, but you don't know if they were successful or not.

---

<div class="post-metadata">

### Author: ![riimeister](https://avatars.discourse-cdn.com/v4/letter/r/ac8455/32.png) [@riimeister](https://discourse.nodered.org/u/riimeister)
#### Post date: [18 December 2024 06:37 UTC](https://discourse.nodered.org/t/can-node-mssql-running-in-many-flow/93954/8 "2024-12-18T06:37:57Z")

</div>

can you send me an example of the flow you created? so I can test it and see the difference with the one I created

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [18 December 2024 06:38 UTC](https://discourse.nodered.org/t/can-node-mssql-running-in-many-flow/93954/9 "2024-12-18T06:38:53Z")

</div>

The example shows an explanation how to do it, you should be able to replicate it.

The 'query' node in the screenshot will contain the query and should be set to `msg.query`

---

<div class="post-metadata">

### Author: ![riimeister](https://avatars.discourse-cdn.com/v4/letter/r/ac8455/32.png) [@riimeister](https://discourse.nodered.org/u/riimeister)
#### Post date: [18 December 2024 06:52 UTC](https://discourse.nodered.org/t/can-node-mssql-running-in-many-flow/93954/10 "2024-12-18T06:52:30Z")

</div>

what settings are set in mssql-plus node?

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [18 December 2024 06:52 UTC](https://discourse.nodered.org/t/can-node-mssql-running-in-many-flow/93954/11 "2024-12-18T06:52:43Z")

</div>

Similar setup I have for MySQL Node. I also have a rate limit node before as sometimes in my flow, there is a sudden surge of queries and it helps control the same.

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

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [18 December 2024 06:54 UTC](https://discourse.nodered.org/t/can-node-mssql-running-in-many-flow/93954/12 "2024-12-18T06:54:25Z")

</div>

I use these settings

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

---

<div class="post-metadata">

### Author: ![riimeister](https://avatars.discourse-cdn.com/v4/letter/r/ac8455/32.png) [@riimeister](https://discourse.nodered.org/u/riimeister)
#### Post date: [18 December 2024 06:58 UTC](https://discourse.nodered.org/t/can-node-mssql-running-in-many-flow/93954/13 "2024-12-18T06:58:22Z")

</div>

I think the flow I created like this works because the debug results show that the data is sent to the SQL database.

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

---

<div class="post-metadata">

### Author: ![riimeister](https://avatars.discourse-cdn.com/v4/letter/r/ac8455/32.png) [@riimeister](https://discourse.nodered.org/u/riimeister)
#### Post date: [18 December 2024 07:01 UTC](https://discourse.nodered.org/t/can-node-mssql-running-in-many-flow/93954/14 "2024-12-18T07:01:37Z")

</div>

aaaahh alright, can i see the configuration of that node? for comparison

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [18 December 2024 07:02 UTC](https://discourse.nodered.org/t/can-node-mssql-running-in-many-flow/93954/15 "2024-12-18T07:02:53Z")

</div>

Ok how do you keep track of the output that is generated (ie. was the insert successful ? and what if it fails?) and what do you do with the output ?

A typical flow is: data in \> process \> data out \> do something with the output

---

<div class="post-metadata">

### Author: ![riimeister](https://avatars.discourse-cdn.com/v4/letter/r/ac8455/32.png) [@riimeister](https://discourse.nodered.org/u/riimeister)
#### Post date: [18 December 2024 07:06 UTC](https://discourse.nodered.org/t/can-node-mssql-running-in-many-flow/93954/16 "2024-12-18T07:06:34Z")

</div>

for now, track it with the debug function results that show the insert into was successful and do a check in the SQL Server database, is there anything missing in this step?

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [18 December 2024 11:21 UTC](https://discourse.nodered.org/t/can-node-mssql-running-in-many-flow/93954/17 "2024-12-18T11:21:27Z")

</div>

here you go.. may not be comparable to MSSQL node though.

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

---

<div class="post-metadata">

### Author: ![riimeister](https://avatars.discourse-cdn.com/v4/letter/r/ac8455/32.png) [@riimeister](https://discourse.nodered.org/u/riimeister)
#### Post date: [19 December 2024 06:16 UTC](https://discourse.nodered.org/t/can-node-mssql-running-in-many-flow/93954/18 "2024-12-19T06:16:04Z")

</div>

problem solved guys, thank u for help me!! @Steve-Mcl @bakman2 @smanjunath211 using Link node its works!!  
input from 70 mqtt machine to mssql in the same time hahah

---

<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: [19 March 2025 06:16 UTC](https://discourse.nodered.org/t/can-node-mssql-running-in-many-flow/93954/19 "2025-03-19T06:16:34Z")

</div>

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