# DB connection health check

**URL:** <https://forum.inductiveautomation.com/t/db-connection-health-check/76272>\
**Category:** Ignition\
**Tags:** database\
**Created:** [July 12, 2023, 5:26pm UTC](https://forum.inductiveautomation.com/t/db-connection-health-check/76272 "2023-07-12T17:26:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Isabela\_Babcock](https://avatars.discourse-cdn.com/v4/letter/i/ee7513/32.png) [@Isabela\_Babcock](https://forum.inductiveautomation.com/u/Isabela_Babcock)\
**Post date:** [July 12, 2023, 5:26pm UTC](https://forum.inductiveautomation.com/t/db-connection-health-check/76272/1 "2023-07-12T17:26:46Z")

</div>

Hello,

I recently watched some videos on Store and Forward and how requests are queued in the event a db connection is down.

I have a use case where I need to "probe" the DB connection from Ignition prior to executing any scripts. In other words, I'm looking to script a health check that will call the DB and see if the connection is in a healthy state. If the response is positive, than all normal ignition processes are allowed to run.

Has anybody done anything similar and can share the scripting objects used to leverage the state of the connection, or any tips involving this subject?

Thanks in advance!  
Bela

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 12, 2023, 5:30pm UTC](https://forum.inductiveautomation.com/t/db-connection-health-check/76272/2 "2023-07-12T17:30:25Z")

</div>

There are system tags available with rich information about each database connection:  
[https://docs.inductiveautomation.com/display/DOC81/System+Tags#SystemTags-GatewaySystemTags](https://docs.inductiveautomation.com/display/DOC81/System+Tags#SystemTags-GatewaySystemTags)

---

<div class="post-metadata">

**Author:** ![Isabela\_Babcock](https://avatars.discourse-cdn.com/v4/letter/i/ee7513/32.png) [@Isabela\_Babcock](https://forum.inductiveautomation.com/u/Isabela_Babcock)\
**Post date:** [July 12, 2023, 6:07pm UTC](https://forum.inductiveautomation.com/t/db-connection-health-check/76272/3 "2023-07-12T18:07:50Z")

</div>

Thanks @paul-griffith!

---

<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:** [July 12, 2023, 6:08pm UTC](https://forum.inductiveautomation.com/t/db-connection-health-check/76272/4 "2023-07-12T18:08:15Z")

</div>

Scripts don't go through the store and forward system unless you deliberately choose the `*SF*` versions of the system functions. You can probably just use `try:` - `except:` blocks for simple purposes.
