# Guaranteed delivery & MS SQL plus

**URL:** <https://discourse.nodered.org/t/guaranteed-delivery-ms-sql-plus/62685>\
**Category:** General\
**Created:** [16 May 2022 11:05 UTC](https://discourse.nodered.org/t/guaranteed-delivery-ms-sql-plus/62685 "2022-05-16T11:05:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![crashoverhead](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/crashoverhead/32/44849_2.png) [@crashoverhead](https://discourse.nodered.org/u/crashoverhead)\
**Post date:** [16 May 2022 11:05 UTC](https://discourse.nodered.org/t/guaranteed-delivery-ms-sql-plus/62685/1 "2022-05-16T11:05:27Z")

</div>

Hi all ,  
my flow read data from an energy meter and insert it a MS SQL server, it work fine but i want add the Guaranteed delivery to avoid data loss. I tryed to configure i dont understand how i need to configure with MS SSQL plus.  
can you help me please?

thanks in advance!

---

<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 11:25 UTC](https://discourse.nodered.org/t/guaranteed-delivery-ms-sql-plus/62685/2 "2022-05-16T11:25:05Z")

</div>

You will need to do this yourself. There is nothing built in to the node to queue-up your requests/queries (none of the DB nodes do as far as i know).

What I (and others) do is: Data to be written to the database is stored in a "stack". This stack is simply an array in node-red flow context (backed by file storage to reduce losses due to power outage of node-red)

When there is data in the "stack" I peak the "next" entry in the "stack" & attempt a DB INSERT. If the output of MSSQL-PLUS indicates success, I "shift" the item off the stack.

---

<div class="post-metadata">

**Author:** ![crashoverhead](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/crashoverhead/32/44849_2.png) [@crashoverhead](https://discourse.nodered.org/u/crashoverhead)\
**Post date:** [16 May 2022 11:37 UTC](https://discourse.nodered.org/t/guaranteed-delivery-ms-sql-plus/62685/3 "2022-05-16T11:37:08Z")

</div>

i found this flow [Guaranteed delivery of data (upload, email etc) across a network (flow) - Node-RED](https://flows.nodered.org/flow/05e6d61f14ef6af763ec4cfd1049ab61) .. i try with stack

---

<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:** [30 May 2022 11:37 UTC](https://discourse.nodered.org/t/guaranteed-delivery-ms-sql-plus/62685/4 "2022-05-30T11:37:25Z")

</div>

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