Trend sqlth_scinfo and sqlth_drv table duplicates added every x months

I seem to run into this issue every few months on a particular site, where they will suddenly lose visibility of all trend data. Adding an x-trace will show the trace in the far left of the chart and the date 1/1/1970.

When I look in the sqlth_scinfo table, I then see additional rows now with multiple rows for the same scnames, and multiple of the same provider in the sqlth_drv table:

image
image

I used to be able to fix this by changing the drvid in the scinfo table to the latest in the drv table, but this doesn’t seem to work anymore… I also noticed that now I have a new “system” provider, so I tried adding a tag from the system provider, and this does show the trend data now, even back months ago…
I have a lot of trends scattered throughout the project though and don’t want a have to update every single tag path to use [/.system]tag/path instead of tag/path or [~]tag/path.

Not sure how to diagnose this one!

Edit: this time, changing the drvid’s in the sqlth_scinfo table all to 4 (i.e. the latest drvid, excluding the ‘system’ provider). This is what I updated the table to, and now trend data is working correctly… Still want to get to the bottom of why it keeps destroying itself?

image

@nminchin did you ever get an answer on this? I'm having the same issue on 8.1.7 and I'm wondering if upgrading to the current version (8.1.22) would prevent this from happening.

I see you've had similar issues regarding this here.

Anyone from IA want to weigh in on this one? @PGriffith ?

My suspicion from Nick's original post is that someone in the facility is restoring a gateway backup enabled, it's connecting to the same DB, and it's thus registering a whole 'new' set of historian providers.
I can't really speak to your situation. I would recommend contacting support.

1 Like

Hello @nminchin Did you got this figured out?

Ha, I only just saw this, and this actually might make sense. I think potentially I might have been VPNd into the site network, and unknowingly had my local ignition gateway running which then connected to the site db. It's not often I have my local gateway actually running, and even more rare that I would have this site's gateway restored, but it's not completely unfeasible.. I only hear about the issue very occasionally, maybe once a year or so