# Transaction Groups - writing OPC data to Oracle Database

**URL:** <https://forum.inductiveautomation.com/t/transaction-groups-writing-opc-data-to-oracle-database/81468>\
**Category:** Ignition\
**Tags:** database\
**Created:** [November 3, 2023, 3:15pm UTC](https://forum.inductiveautomation.com/t/transaction-groups-writing-opc-data-to-oracle-database/81468 "2023-11-03T15:15:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tyler\_Bharose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tyler_bharose/32/52535_2.png) [@Tyler\_Bharose](https://forum.inductiveautomation.com/u/Tyler_Bharose)\
**Post date:** [November 3, 2023, 3:15pm UTC](https://forum.inductiveautomation.com/t/transaction-groups-writing-opc-data-to-oracle-database/81468/1 "2023-11-03T15:15:16Z")

</div>

Hello,

I am trying to use a Historical Transaction group to write OPC data from Tags into an Oracle database connection. I setup the transaction group to automatically create a table (with its own index). However, when running the transacation group, the table is being created but no data is being written to it. Instead, the data is quarantined in store and forward with the error message: **"java.sql.BatchUpdateException: ORA-01400: cannot insert NULL into ("IGNITION"."OPC\_TAGS"."opc\_tags\_ndx") [ORA-01400 - Database Error Messages](https://docs.oracle.com/error-help/db/ora-01400/)"**.

When attempting to enable the "Bypass Store and Forward system" option is the Transaction group options, it would say "Errored" and would not run.

When I tried writing to an SQLite database connection, the transaction group is functioning as intended.  
Any ideas why this error is happening only with the Oracle database?

---

<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:** [November 3, 2023, 3:21pm UTC](https://forum.inductiveautomation.com/t/transaction-groups-writing-opc-data-to-oracle-database/81468/2 "2023-11-03T15:21:46Z")

</div>

Ignition expects DBs to have some form of auto-index column type for a primary key. Oracle apparently is choking on this. You might have to set up a sequence as the default value for that column manually.

---

<div class="post-metadata">

**Author:** ![Tyler\_Bharose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tyler_bharose/32/52535_2.png) [@Tyler\_Bharose](https://forum.inductiveautomation.com/u/Tyler_Bharose)\
**Post date:** [November 3, 2023, 3:41pm UTC](https://forum.inductiveautomation.com/t/transaction-groups-writing-opc-data-to-oracle-database/81468/3 "2023-11-03T15:41:19Z")

</div>

When looking at the table that the transaction group created automatically, it seems that the index is already set as the primary key:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/1/118f2498c00cc017a09589693f4da2d20cfe2898.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:** [November 3, 2023, 4:06pm UTC](https://forum.inductiveautomation.com/t/transaction-groups-writing-opc-data-to-oracle-database/81468/4 "2023-11-03T16:06:38Z")

</div>

Just being a primary key doesn't mean it will auto-populate. It needs a dynamic default value for that part to work.
