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.
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.
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.