# Could you bind a tag to a database status?

**URL:** <https://forum.inductiveautomation.com/t/could-you-bind-a-tag-to-a-database-status/106463>\
**Category:** Ignition\
**Created:** [May 20, 2025, 4:10pm UTC](https://forum.inductiveautomation.com/t/could-you-bind-a-tag-to-a-database-status/106463 "2025-05-20T16:10:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielps1818](https://avatars.discourse-cdn.com/v4/letter/d/ecae2f/32.png) [@danielps1818](https://forum.inductiveautomation.com/u/danielps1818)\
**Post date:** [May 20, 2025, 4:10pm UTC](https://forum.inductiveautomation.com/t/could-you-bind-a-tag-to-a-database-status/106463/1 "2025-05-20T16:10:10Z")

</div>

Is there any way to bin a tag to a database connection.

I want an easy way of checking if the database is FAULTED. From then I could create another boolean tag that only is True if the quality or the status of the database is one that the script could work.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![vtran](https://avatars.discourse-cdn.com/v4/letter/v/779978/32.png) [@vtran](https://forum.inductiveautomation.com/u/vtran)\
**Post date:** [May 20, 2025, 4:12pm UTC](https://forum.inductiveautomation.com/t/could-you-bind-a-tag-to-a-database-status/106463/2 "2025-05-20T16:12:40Z")

</div>

I think you can use the System tag at `[System]Gateway/Database/<Database Name>/Available`  
If you need a tag in your own provider, can just create a reference tag and point to it.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 20, 2025, 4:34pm UTC](https://forum.inductiveautomation.com/t/could-you-bind-a-tag-to-a-database-status/106463/3 "2025-05-20T16:34:18Z")

</div>

I don't know if it would help, but the Config | DATABASES | Connections | Advanced | Connection Testing is typically using,

> Validation Query   
> `SELECT 1`  
> A SQL query that will be used to validate connections from the pool. This query MUST be an SQL SELECT statement that returns at least one row.  
> (default: SELECT 1)

You could replicate this by creating a query tag, Data Type: Integer, Execution Rate: Fixed Rate with a suitable rate.
