Tag Historian not creating (or attempting to create) SQL Server tables

Tag Historian was working till recently on Ignition 8.0. I added a new tag and configured history on it but the historical data for this new tag wasn’t being stored.

As this was a test system, recreated everything from scratch (including fresh install of Ignition) but now none of the tags have history. The issue exists with both Ignition 8.0 and 8.1.

I am connecting to a SQL Server 2019 DB using the provided JDBC driver and the connection status is “Valid”. The ignition user is configured with all the required DB permissions and I can create tables from the Query Browser. However none of the historian tables are being auto-generated as Ignition does not even attempt the CREATE TABLE queries required. There are no records being quarantined in “Store and Forward” either.

I do see some unexpected errors in the Gateway Logs and am wondering if these point to some internal error in Ignition.

I’ve seen similar behavior on 7.9 where the tables were not created.
Try disabling then re-enabling the history provider.

1 Like

Tried it and it still doesn’t work.

The strange thing is that it worked at one point for a few tags. Then I added a new tag but history wasn’t being stored for this tag (the existing tags continued to store history however). So I created a new SQL DB and DB connection but no tables were being auto-generated in the new DB and none of the tags were storing history (even the ones that previously worked with the old DB).

The error logs don’t help much as the error message is “unexpected exception when handling another exception”

Figured out what the issue is. There was nothing wrong with the Ignition or SQL Server settings.

Historian does not start storing tag values to the DB even when in periodic mode until the initial store is triggered by the tag value changing. Once the initial store is triggered then values will continue to be stored based on the specified period.

eg. tag1=10,tag2=20 both with periodic history of sample rate 1second. If tag1 and tag2 values do not change after history is enabled on those tags then there will be no history stored for either tag. Then we change the value of tag1=11 (tag2=20 is not changed). This triggers the initial store for tag1 and tag1 will now be stored every 1 second. tag 2 will not be stored.

1 Like

I have just experienced the same issue after setting up a new tag history provider. Unfortunately, the only way I could get the historian to create the tables and start logging was to restart the gateway.

1 Like