My customer wrongly requested that I delete a tag and now wants it restored.
Using a gateway backup, I exported and then imported the required tag back into Ignition. I have updated the sqlth_te table so that this tag’s retired value is returned to NULL.
I can assign the tag in the ad hoc chart, but I cannot see any of the historical data that was captured. What do I need to do to resolve this?
Check sqlth_te for duplicates. The most likely explanation I can provide is that a new entry was added, and is the one used.
When you edited the table, it made no difference as the cache was still showing a retired tag entry at this path and a new one was created.
When you manually edit the historian tables, make sure to restart the history provider to make it rebuild its cache.
2 Likes
Hi Pascal, thanks for the feedback. Yes, you were correct, there were two entries in sqlth_te with the most recent entry generated from the recent import.
I have deleted the latest entry and restarted the historian, but still, no historical data is available. Do you have any further suggestions, please?
There's a chance tags have a hidden, internal id, and that it doesn't match.
But that's way out of my knowledge, you'll have better answers from someone else (most likely Paul or Phil).
I kinda wish you had not deleted the latest entry yet. You should have checked some of its meta data first, following the scid -> drvid trail.
For now I guess you can check what happens when your tag gets new data: Is that data sent to the current entry in sqlth_te ? Or is a new one created ?