# Transaction group doesn't insert data to database even designer says it executed

**URL:** <https://forum.inductiveautomation.com/t/transaction-group-doesnt-insert-data-to-database-even-designer-says-it-executed/72950>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [April 27, 2023, 12:56am UTC](https://forum.inductiveautomation.com/t/transaction-group-doesnt-insert-data-to-database-even-designer-says-it-executed/72950 "2023-04-27T00:56:53Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![uy\_huynh](https://avatars.discourse-cdn.com/v4/letter/u/54ee81/32.png) [@uy\_huynh](https://forum.inductiveautomation.com/u/uy_huynh)\
**Post date:** [April 27, 2023, 12:56am UTC](https://forum.inductiveautomation.com/t/transaction-group-doesnt-insert-data-to-database-even-designer-says-it-executed/72950/1 "2023-04-27T00:56:53Z")

</div>

Hi all,  
Recently we had a problem with the transaction group, the condition was triggered, total execution was increased, there was no quarantined data, but I couldn't see any data at the time. And around 20 minutes later, all the data popped up.  
Please find the attached pic and feel free to give your opinions!

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/4/c4636461794b1b462ec62d4de686a96711a53df0.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/c/2c0bf555f73acba16f10e1c9d52d14d14164f49c.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 27, 2023, 12:26pm UTC](https://forum.inductiveautomation.com/t/transaction-group-doesnt-insert-data-to-database-even-designer-says-it-executed/72950/2 "2023-04-27T12:26:18Z")

</div>

> [@uy\_huynh](#):
>
> there was no quarantined data

Data that is buffered by the S&F engine is not "quarantined". It is simply buffered. Quarantine is for records that the DB actively refuses.

You should inspect your DB's status and performance. A long blocking query could have been holding up the inserts from your S&F subsystem.

---

<div class="post-metadata">

**Author:** ![uy\_huynh](https://avatars.discourse-cdn.com/v4/letter/u/54ee81/32.png) [@uy\_huynh](https://forum.inductiveautomation.com/u/uy_huynh)\
**Post date:** [April 28, 2023, 12:06am UTC](https://forum.inductiveautomation.com/t/transaction-group-doesnt-insert-data-to-database-even-designer-says-it-executed/72950/3 "2023-04-28T00:06:04Z")

</div>

I had a look at store&forward but no error shows. I also had an overall look in connection tab inside gateway status, no error shows!

---

<div class="post-metadata">

**Author:** ![uy\_huynh](https://avatars.discourse-cdn.com/v4/letter/u/54ee81/32.png) [@uy\_huynh](https://forum.inductiveautomation.com/u/uy_huynh)\
**Post date:** [April 28, 2023, 1:10am UTC](https://forum.inductiveautomation.com/t/transaction-group-doesnt-insert-data-to-database-even-designer-says-it-executed/72950/4 "2023-04-28T01:10:40Z")

</div>

So I've recreated new table inside the sql database. Problem still happens as you can see in attached pic. There is no error in gateway status overall.

 ![Untitled](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/f/8f74fa17e2432febdf03618b49cd7ee3673c310a.png)

---

<div class="post-metadata">

**Author:** ![WillMT10](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@WillMT10](https://forum.inductiveautomation.com/u/WillMT10)\
**Post date:** [April 28, 2023, 1:22am UTC](https://forum.inductiveautomation.com/t/transaction-group-doesnt-insert-data-to-database-even-designer-says-it-executed/72950/5 "2023-04-28T01:22:07Z")

</div>

Does your database table have any unique constraints or indexes?

Edit: Ehh, never mind. Wasn't thinking clearly. Would throw an error if that were the culprit. Also looks like you're utilizing the transaction group to create the table, so that should be ok.

---

<div class="post-metadata">

**Author:** ![uy\_huynh](https://avatars.discourse-cdn.com/v4/letter/u/54ee81/32.png) [@uy\_huynh](https://forum.inductiveautomation.com/u/uy_huynh)\
**Post date:** [April 28, 2023, 1:30am UTC](https://forum.inductiveautomation.com/t/transaction-group-doesnt-insert-data-to-database-even-designer-says-it-executed/72950/6 "2023-04-28T01:30:35Z")

</div>

Yup! I was thinking about the unique cons or indexes, that's why I've changed the name of old one, and use the automatically create the table option. But it still behaves wrong!

---

<div class="post-metadata">

**Author:** ![WillMT10](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@WillMT10](https://forum.inductiveautomation.com/u/WillMT10)\
**Post date:** [April 28, 2023, 1:57am UTC](https://forum.inductiveautomation.com/t/transaction-group-doesnt-insert-data-to-database-even-designer-says-it-executed/72950/7 "2023-04-28T01:57:55Z")

</div>

Getting screenshots of the entire Action, Trigger, and Options panels will help with troubleshooting. Also, anything showing up in your "Events" tab (to the right of your "Status" tab)?

---

<div class="post-metadata">

**Author:** ![uy\_huynh](https://avatars.discourse-cdn.com/v4/letter/u/54ee81/32.png) [@uy\_huynh](https://forum.inductiveautomation.com/u/uy_huynh)\
**Post date:** [April 28, 2023, 3:47am UTC](https://forum.inductiveautomation.com/t/transaction-group-doesnt-insert-data-to-database-even-designer-says-it-executed/72950/8 "2023-04-28T03:47:30Z")

</div>

So I've figured out all misssing data are in store and forward. Even though no error in gateway log and the store and forward said no data was quarantined. But I noticed there was number 2/25000 records. And I did a backfill store and forward method, luckily got all data back. Question is what reason caused this?  
@pturmel I've searched a comment from you said to turn on the bypass store and forward. Can I ask why?

> [@Delay Between Transaction Group and Database](https://forum.inductiveautomation.com/t/delay-between-transaction-group-and-database/41000/2):
>
> Are you using the store and forward system? If so, consider turning it off (bypass) for that group.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 28, 2023, 3:53am UTC](https://forum.inductiveautomation.com/t/transaction-group-doesnt-insert-data-to-database-even-designer-says-it-executed/72950/9 "2023-04-28T03:53:01Z")

</div>

> [@uy\_huynh](#):
>
> Can I ask why?

IIRC, in that case, the user needed the data in the database immediately to display on the UI. The S&F buffer will always add some latency, and screw up a UI. For typical UI operations, you want the DB operation to fail with immediate notice to the user, not be buffered.

But let me rephrase and elaborate on an earlier statement: Buffering in the S&F system **is not an error** , nor is it quarantine. Your comments above expressing surprise that there were neither errors nor quarantined records suggests a fundamental misunderstanding of the S&F system. Buffering when the DB cannot keep up or is briefly unavailable is the **intended purpose**.

It was **not**"behaving wrong".

---

<div class="post-metadata">

**Author:** ![uy\_huynh](https://avatars.discourse-cdn.com/v4/letter/u/54ee81/32.png) [@uy\_huynh](https://forum.inductiveautomation.com/u/uy_huynh)\
**Post date:** [April 28, 2023, 4:11am UTC](https://forum.inductiveautomation.com/t/transaction-group-doesnt-insert-data-to-database-even-designer-says-it-executed/72950/10 "2023-04-28T04:11:05Z")

</div>

Thanks for clarifying.  
"you want the DB operation to fail with immediate notice to the user, not be buffered." What if the operation still continues during the fail, and bypass is on, all data during that time would not be stored anywhere else ?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 28, 2023, 11:47am UTC](https://forum.inductiveautomation.com/t/transaction-group-doesnt-insert-data-to-database-even-designer-says-it-executed/72950/11 "2023-04-28T11:47:33Z")

</div>

The S&F system is intended to allow a recording process to continue operating at speed while a DB connection is broken or temporarily running slower than the process. When the DB returns to normal operation, the buffered entries will be stored in the DB.

If the DB **does not** return to normal, then the buffers will reach capacity and **then** you will get errors.

If you don't use the S&F system (bypass), then a recording process will either receive an error for a broken DB, or will fall behind on its sampling while waiting for the DB. Separately for each DB operation. Any process operation that needs 100% confidence of recording (product per-piece quality tracking, perhaps) should not use the S&F system, so that the production line can pause until the DB properly stores the required information.
