Hello, we have a project where we are selectively enabling tag history using scripts. Part of our project requires that we keep some additional meta data in other tables for these tags when we do this. Our script is using the system.tag.configure method to enable the history on these tags and that seams to be working correctly. We then want to use the ID field from sqlth_te as a foreign key in our other table to maintain the relationship with the additional data. Our current script will attempt to query sqlth_te just after the system.tag.configure call to obtain the ID field from sqlth_te. This seems to work inconsistently. Sometimes it will work correctly however many times we notice there is significant delays before an entry appears in this table. There have also been times where an entry never seems to appear in this table.
We are assuming this might be caused by some internal caching being done in the historian module thats delaying writes to SQL but I am not sure about that.
Is there another way for us to obtain this ID field from sqlth_te? Perhaps a way to query the cache, or a flush command, etc… We have to date been unsuccessful in finding a way using the documentation and forum but perhaps we just missed something
Thanks for any tips on this