# MSSQL-PLUS node error

**URL:** <https://discourse.nodered.org/t/mssql-plus-node-error/84398>\
**Category:** General\
**Created:** [8 January 2024 20:17 UTC](https://discourse.nodered.org/t/mssql-plus-node-error/84398 "2024-01-08T20:17:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![lesmar96](https://avatars.discourse-cdn.com/v4/letter/l/b5a626/32.png) [@lesmar96](https://discourse.nodered.org/u/lesmar96)\
**Post date:** [8 January 2024 20:17 UTC](https://discourse.nodered.org/t/mssql-plus-node-error/84398/1 "2024-01-08T20:17:18Z")

</div>

I am trying to execute a stored procedure on a MSSQL database. I have attempted to closely follow the instructions [here.](https://discourse.nodered.org/t/stored-procedure-with-mssql-plus-node/36466) Though I don't understand all the specifics.

Here is how the MSSQL node is configured currently:

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

I have the connection configured and it doesn't give me any obvious warnings there.  
But I get this in the debug.

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

My skillset is not yet sharpened enough to that I know where to start looking.  
I don't manage the db or the stored procedure, but I have been giving the name and parameters.

Appreciate your input and let me know if you need more information!! Thanks so 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:** [8 January 2024 21:19 UTC](https://discourse.nodered.org/t/mssql-plus-node-error/84398/2 "2024-01-08T21:19:59Z")

</div>

> [@lesmar96](#):
>
> Here is how the MSSQL node is configured currently:
> 
> ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/9/498ec44c7f1230ba097b996e694a3e487e705017.png)

Are you sure the values are in `msg.` and not `msg.payload.`?

Add a debug node BEFORE the SQL node and show us the output.

* * *

PS: to be sure you use the correct path to an item, use the tools provided:

There’s a great page in the docs ([Working with messages : Node-RED](https://nodered.org/docs/user-guide/messages)) that will explain how to use the debug panel to find the right path to any data item.

Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.

![BX00Cy7yHi](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/d/bd1f333a9e043b061b39917c328b0094d3e52d30.gif)

---

<div class="post-metadata">

**Author:** ![lesmar96](https://avatars.discourse-cdn.com/v4/letter/l/b5a626/32.png) [@lesmar96](https://discourse.nodered.org/u/lesmar96)\
**Post date:** [8 January 2024 21:34 UTC](https://discourse.nodered.org/t/mssql-plus-node-error/84398/3 "2024-01-08T21:34:53Z")

</div>

> [@Steve-Mcl](#):
>
> Are you sure the values are in `msg.` and not `msg.payload.`?

Yes, Here is the function ahead of the MSSQL node and I'm returning `mtr1`.

```auto
var mtr1 = {WaterMeterId: 1, 
            WaterMeterPanelId: 1,
            GallonsPerMinute: meter1};

```

But I have solved the issue. I believe the error was there from before I had the connection configured, and although I had redeployed, I had failed to retrigger the node itself.

I have an issue where it doesn't resolve the name of the server, I need to use the IP address. Does it not use the DNS server that the Pi itself is using? I did not enter anything under `Domain` in the connection settings because I was unable to find documentation of how its used.

Another question, if the MSSQL node receives multiple messages simultaneously, does it queue them and process them gracefully. It appears to be working fine, but I was wondering if that's a good practice.

---

<div class="post-metadata">

**Author:** ![lesmar96](https://avatars.discourse-cdn.com/v4/letter/l/b5a626/32.png) [@lesmar96](https://discourse.nodered.org/u/lesmar96)\
**Post date:** [10 January 2024 12:56 UTC](https://discourse.nodered.org/t/mssql-plus-node-error/84398/4 "2024-01-10T12:56:37Z")

</div>

Good Morning,  
This is my main question remaining:

> [@lesmar96](#):
>
> Another question, if the MSSQL node receives multiple messages simultaneously, does it queue them and process them gracefully? It appears to be working fine, but I was wondering if that's a good practice

Does any one have any thoughts? Is this good practice from the perspective of the MSSQL node itself and from the DB?

---

<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:** [10 January 2024 14:07 UTC](https://discourse.nodered.org/t/mssql-plus-node-error/84398/5 "2024-01-10T14:07:14Z")

</div>

> [@lesmar96](#):
>
> > [@lesmar96](#):
> >
> > Another question, if the MSSQL node receives multiple messages simultaneously, does it queue them and process them gracefully? It appears to be working fine, but I was wondering if that's a good practice
> 
> Does any one have any thoughts? Is this good practice from the perspective of the MSSQL node itself and from the DB?

I forget if there is anything inside the node that would potentially cause issues with concurrency. I do know if you hammer it you can reach your connection limit.

What i always did with SQL (and many other things that are async/external like ModBus and PLC comms) is to create a kinda streaming gateway - far less complex than it sounds.

Essentially, I would create a subroutine with a small rate limit of say 0.1sec just to throttle moments of madness.

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

(just change HTTP to MSSQL-PLUS - its the same pattern)

---

<div class="post-metadata">

**Author:** ![lesmar96](https://avatars.discourse-cdn.com/v4/letter/l/b5a626/32.png) [@lesmar96](https://discourse.nodered.org/u/lesmar96)\
**Post date:** [10 January 2024 14:35 UTC](https://discourse.nodered.org/t/mssql-plus-node-error/84398/6 "2024-01-10T14:35:15Z")

</div>

The rate limit node is a good idea. I am sending a bunch of messages every 2 seconds and using that node I can effectively spread them out over the wait time.

Thanks!

---

<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:** [24 January 2024 14:36 UTC](https://discourse.nodered.org/t/mssql-plus-node-error/84398/7 "2024-01-24T14:36:03Z")

</div>

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