Some CALC BULK and POWER measurements are randomly duplicated during the DB migration process between 2.8.52 and 2.8.157 versions


I’ve updated my OpenHistorian version from 2.8.52 to 2.8.157 in order to improve the last released version of GEPDataExtractor (related to the other topic I’ve opened today). During the update, I’ve been invited by the assistant to migrate the openHistorian database (MySQL) from 2.8.52 to 2.8.157 using the usual process (‘upgrade the existing database to the new one’). I’ve noticed that for some CALC data generated months ago (with the BULK Sequence custom adapter (V+ / V- / zero sequence … phase angles and magnitudes stored in the measurements table) and the POWERCALC one) some of the measurements have been (apparently randomly) duplicated. Apparently it’s sometimes the older one, and some other times the newer one that is finally consider as ‘valid’ ; but only one of the two have some values associated in the monitoring > Graphe Real-Time Measurements window.
As examples :

For the same PMU :

For these measurements, the following request :
Description like ‘%PMU_1%’ and Description Like ‘%IA Zero Sequence Current Phase Angle%’
returns only one line in the 2.8.52 DB and two in the 2.8.152 DB.

It’s annoying because in Grafana I have now some data missing for the measurements that have been duplicated, loosing some history :

Depending on which measurement have 'apparently randomly) been ‘considered’ by openHistorian (older or new duplicateed one), I now have a loss of old data or a loss of new ones :

Could you please investigate on the reason of this issue please ?
I’ve tried to delete from the Measurement table the measure that are not used anymore, but it seems that I can’t retrieve the historical data stored with the previous tag in Grafana.

Thank you very much for considering this issue ; feel free to ask me any question wich could help you to investigate and diagnose this case.



I am sorry that this happened. In a code investigation, I am not sure what process in the database migration could have caused measurement duplication.

Is it possible that you went the openHistorian web page interface for a device and clicked “Save” again? This would have possible created new measurements if it did not recognize the old tag names.

Did you per-chance run the Tag Name Expression updater tool at the end of the install process? This could have slightly changed tag names such that when saving a device, it thought the tag names no longer existed and created new ones?

Perhaps we can further discuss how it may be possible to converge old data into new tags?


Hello Ritchie,

Sorry for the delay of my reply.
I did not use the web interface during the DB migration process. I only ran the next/next/next process that is provide when updatting a version of openHistorian/PDC version. I also did not use the UpdateTagName tool because it seems to not be compatible with some tools of WSU oscillations analysis solutions (I have to check this point again, since my last testshave been made 2 years ago …).
Just the standard update DB process seems to have cause the issue.

If you are agree : I 'll make a new try in the next couple of weeks and see if the issue is occuring again (and on the same measurements which could be interesting …). If it does ; i’ll send you a dump of my DB on your email adress and you may be able to check it by yourself …

Thank you very much for your support;

Have a nice day,