Can Node Mssql running in many flow?

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

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)

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)

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?


link out and link in like this? looks like it works

This is the concept:

  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.

I made it like this, is it working properly?

'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.

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

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

what settings are set in mssql-plus node?

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.

I use these settings

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

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

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

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?

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

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

1 Like