# Ignition - best way to redundancy 2 Databases

**URL:** <https://forum.inductiveautomation.com/t/ignition-best-way-to-redundancy-2-databases/84757>\
**Category:** Ignition\
**Tags:** database, scripting\
**Created:** [January 25, 2024, 10:37am UTC](https://forum.inductiveautomation.com/t/ignition-best-way-to-redundancy-2-databases/84757 "2024-01-25T10:37:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![davee\_s](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@davee\_s](https://forum.inductiveautomation.com/u/davee_s)\
**Post date:** [January 25, 2024, 10:37am UTC](https://forum.inductiveautomation.com/t/ignition-best-way-to-redundancy-2-databases/84757/1 "2024-01-25T10:37:04Z")

</div>

Hello guys, I have an Ignition project developing with the possibility to have 2 Database Servers with Ignition in redundancy. What I want to reach is to keep syncronyzed the 2 Databases, in a way that each update and delete query executed on a Database Server is done on the other too.  
I am using NamedQueries and this is fine if you are using only a single Datasource.  
If I want to use system.db.runSFNamedQuery Ignition will send query to Store&Forward but I can't get back the effective result of the query, if there is an error or not because it returns only if the query is sent to Store&Forward system.  
Is there a way to execute the query on the host who is performing the query and if it is correct, then send the same query to the Store&Forward of the other host?  
In another project I setted up the same logic but using runSFPrepUpdate where I can specify the correct Datasource to use. Thanks

---

<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:** [January 25, 2024, 12:44pm UTC](https://forum.inductiveautomation.com/t/ignition-best-way-to-redundancy-2-databases/84757/2 "2024-01-25T12:44:49Z")

</div>

This is called multi-master database redundancy, and Ignition has no knowledge of it nor effective way to implement it.

Various DB platforms have this capability themselves, and Ignition should Just Work™ with them. Many DB platforms have their own redundancy technologies, where multiple DB instances stay synchronized, and present a single point for connection to the cluster. Ignition will Just Work™ with those, too.
