# Retrieving Internal SQLTag Information

**URL:** <https://forum.inductiveautomation.com/t/retrieving-internal-sqltag-information/3249>\
**Category:** Ignition\
**Created:** [September 2, 2011, 8:32pm UTC](https://forum.inductiveautomation.com/t/retrieving-internal-sqltag-information/3249 "2011-09-02T20:32:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MadMax](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@MadMax](https://forum.inductiveautomation.com/u/MadMax)\
**Post date:** [September 2, 2011, 8:32pm UTC](https://forum.inductiveautomation.com/t/retrieving-internal-sqltag-information/3249/1 "2011-09-02T20:32:21Z")

</div>

I (and others, see [http://inductiveautomation.com/forum/viewtopic.php?f=70&t=5891&p=15753&hilit=sqltagprop#p15753](http://inductiveautomation.com/forum/viewtopic.php?f=70&t=5891&p=15753&hilit=sqltagprop#p15753)) could really use additional read only access to the internal SQLTag DB.

I propose this access via a script function that would protect the internal DB from any harm. A candidate function patterned after “system.alert.queryAlertStatus” would look something like:

system.internalDb.querySQLTagProperties(tagPath, propName1, propName2, propName3, …)

This function would return a dataset drawing from the internal SQLTAG, SQLTAGPROP, … tables and real-time values as needed.

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [September 8, 2011, 5:50pm UTC](https://forum.inductiveautomation.com/t/retrieving-internal-sqltag-information/3249/2 "2011-09-08T17:50:46Z")

</div>

Sorry I didn’t reply earlier, your other post reminded me of this.

You can pretty much already do this with “system.tag.getTagValue(tagPath)”. The tag path is allowed to be qualified with a property name, so you can do things like:

```auto
system.tag.getTagValue('Path/To/Tag.AlertExecEnabled')
```

To read more than one, right now you’d have to loop through them, but soon (for 7.3, I believe) there will be a new “getTagValues” function that can take multiple paths.

Hope this helps,

---

<div class="post-metadata">

**Author:** ![MadMax](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@MadMax](https://forum.inductiveautomation.com/u/MadMax)\
**Post date:** [September 8, 2011, 6:48pm UTC](https://forum.inductiveautomation.com/t/retrieving-internal-sqltag-information/3249/3 "2011-09-08T18:48:32Z")

</div>

Please see my related post at [http://inductiveautomation.com/forum/viewtopic.php?f=71&t=6851&p=19892#p19892](http://inductiveautomation.com/forum/viewtopic.php?f=71&t=6851&p=19892#p19892).

Hopes this thread helps others thumbing through the manual on this subject.
