6 Replies Latest reply on May 14, 2018 1:22 PM by vkaufmann

    How to find latest modified tags in an archive


      Is there a way to find out what the latest tags were to be edited in an archive? I've got PI archives that are from a couple of weeks ago that show they were modified in the last couple of days, but I have no idea why they would be edited. We have manual entry tags but they are for daily numbers, nothing that would be from a couple of weeks ago. We haven't done any PI recalculations either so I'm a bit confused about what could be modifying the archives.


      I've added a screen shot from PI-SMT showing the archives, with end dates and last modified time stamps, to highlight the issue.




      Any help would be greatly appreciated.





        • Re: How to find latest modified tags in an archive

          Hi Colin,


          What version of PI Data Archive are you using?


          Unfortunately out of the box there is no easy way to know which tags were modified.  There is an internal work item for the Archive File Header to keep track of the last modified record number, in which case this would be easy to track down.  This, however, has not yet been implemented.


          One fairly straightforward method you could try is searching the message logs for connections (or even potentially failed writes) that are created around the time of the last modified times.  Perhaps if a specific application connects right before the modified times, this might lead us in the right direction.


          A few other things that are interesting, is that the modified times look different for each archive, so I agree this does not look like a recalculation or scheduled task that is the culprit in this case.  (except that 4/24 and 4/25 are both right around 1:09 - difficult to say if this is coincidence or not).  They also do not look to update frequently, so my best guess is that this looks to be a manual entry type application that might be making these changes.


          There is a way for us to better track which tags are updated by configuring ProcMon to trace file activity on an archive file, however, we would need to wait for the issue to reoccur in order to get meaningful information and this would not help for a past occurrence of the issue.  If you would like assistance with using this method I can create a technical support case and we can go through the steps to do this.


          - Adam

            • Re: How to find latest modified tags in an archive

              Hi Adam,


              The issue seems to be ongoing and our archives shift every 5/6 days so getting a repeat event won’t take long.


              I’ve looked through the logs but there doesn’t seem to be anything that links to the times I’m getting for the updates. The culprit I was pinning things on is logged out a couple of minutes before the archive last modified timestamp, so I don’t know if that’s a PI timing issue in that it takes a couple of minutes for manually uploaded tags to register in the historical archives.


              If you could raise a support ticket, then we can try the ProcMon approach to see what is actually going on.




              Colin Welsh

              Senior Process Control Specialist

              Cristal Pigments UK

              T   + 44.1.469.553.364

              Mobile   + 44.7972.658048

              E   colin.welsh@cristal.com<mailto:paul.parker@cristal.com>

              F   + 44.1.469.571234

              PO Box 26, Grimsby

              North East Lincolnshire, DN41 8DP


              Time zone: GMT

                • Re: How to find latest modified tags in an archive

                  We have a program that runs daily to query the Data Archive using PI SQL... We retrieve most of the information available via PI SMT or PI builder and save a summary of the changed information in SQL as an audit function for the enterprise....


                  The important point is the last modified field is available via PI SQL... I would look up the actual command, but am about to board an airplane and will be traveling the rest of the day... Hopefully this will help.