Query tag database

Is it possible to query the tag database directly using either MSSQL or MySQL?

If not, has anyone taken the XML export of the tag database and imported them into MSSQL?


For the internal database, no. You can however, have a Tag Driving Provider, where the tags are driven in an external database. Otherwise, it behaves the same. Historical providers though, stay the same.

Interesting… What are the downsides to using another database as the tag provider? Can I move all of my tags from one provider to another?

None that I’m aware, other than other apps may have access to it, and you fat-finger something into oblivion. Not that I’ve ever done that… :whistle innocently: :laughing:

There was an article on this floating around here somewhere, let me see if I can find it…

The standard provider maintains and distributes live values entirely in memory. So data delivery latency and speed of large tag collections is limited only by memory allocated.
Database tag providers route every value update through four+ DB transactions: insert to the write queue, update to the current value, delete from the write queue, and select(s) from subscribers. So, latency is the time it takes for the first two transactions to commit.

All I really want to do is gain access to the structure of the the tag database. Any actual tag values I may need I log so that is easy to access. I log changes to certain tags and I need to link to some metadata (Tool Tip, for example) in the tag database when querying this change data.

I would also like to generate a report of all the tags in the system for audit purposes (for example, do I have the alerts set up correctly for all tags named “*/Setpoint”?). You can probably do all I want to do in Python but I am much more comfortable using SQL.

A quick import of the exported XML file will probably work for me. Or, since the XML seems to just contain deviations from the defaults a way to export this info within Ignition using Python.

Can’t I use UDT in a Tag Driving Provider?