Replay external .d2 files with openHistorian


For the purposes of a posteriori studies, I need to be able to replay defined periods of data archived in .d2 format by our production openHistorian server. For this I rely on a second non-production server with openHistorian in the same version as the production one. I exported / imported the production DB on this replay server; and I copied the .d2 files containing the data to replay on it.

I configured this openHistorian replay instance as follows:

  • Input Device: I’ve filled the PDC device connection string as follow:
  • protocol: IEE C37.118
  • localport=9999; transportprotocol=udp; interface=

I configured the Output > Historian Instance as follows:

  • Acronym: PPA
  • Connection string: ArchiveDirectories={F:\openHistorian\Archive-replay};
    This directory contains the .d2 files I want to replay.

I configured the Inputs > Custom inputs as follows:

  • Name : PPAREADER
  • Type: openHistorian 2.0 (Local)
  • Connection string: InstanceName=PPA; ConnectOnDemand=false; ArchiveDirectories=F:\openHistorian\Archive-replay; PublicationInterval=1; ProcessingInterval=0; AutoRepeat=True; StartTimeConstraint=02-22-2022 21:00:00; StopTimeConstraint=02-22-2022 23:00:00; sourceIDs=PPA

AS I allready said, the .d2 files are in the F:\openHistorian\Archive-replay directory

When I start the service and initialize the different adapters, I see my data replayed at the monitoring > Graph Measurements level, so it seems to work.

However, I only want to replay the data (to send them to another OpenPDC server via a Custom Output). But openHistorian produces its own .d2i files in the default WorkingDirectory (openHistorian/Archive), which I don’t want. Indeed, I fear that with the rollover mechanism these newly produced archives will interfere / alter those in .d2 that I have copied in the openHistorian\Archive-replay directory (ArchiveDirectories).

Is there a way (configuration?) to read data from existing .d2 files, view them in openHistorian and send them via a custom output; without generating new archive files locally? I have tried to deactivate the Historian localoutputAdapter PPA instance but this prevents the reading of data by the PPAREADER.

Any help on the subject would be appreciated.

What you setup will work, but like you say, it will re-archive data.

Are you needing “streaming” data only? You could consider setting up your openHistorian using a “virtual” archive, i.e., it will not archive anything.

Also, if you didn’t want to copy .D2 files, you could consider setting up a temporal STTP connection - again just depends on what you are trying to accomplish.

Can you describe the study use case a little more? Are you needing to run historical streaming data data through an analytic, for example?


Hello !
Here’s what I’m trying to do:

  • In production :
    – I have a Historian server which FIFO archives 1 year of PMU data in the form of .d2 files.
    – I also have a PDC OMS server that performs real-time oscillation analysis/detection.

  • Out of production: The objective is to be able to replay certain temporal portions stored in the production .d2 files with a Historian to send them to a PDC OMS server (also out of production) in order to run the analysis oscillations modules as if it were real-time data; while being able to modify the settings (which I cannot do directly in production) for analysis purposes.

So I have on this non-production space:
– a Historian server that can read the .d2 files copied locally from production and containing the time portion that I want to replay.
– A PDC OMS server running the oscillation detection modules in ‘pseudo’ real time.

I am able to read .d2 files from the Historian fine but I don’t want it to generate new archive files that would get mixed up with those copied from production.
A second problem also arises: it does not seem possible to create a Concentrator Output Stream from OpenHistorian to send the data to the PDC OMS. I was thinking of using an internal STTP subscription to do this (failing to create subscriptions using TLS as mentioned in another topic).

To summarize: I need non-production to be able to read .d2 files coming from a Historian in production and to be able to send them (by C37.118 preferably) towards a PDC non-production which would make run the modules of detection of oscillations .

I have already managed to do this with OpenPDC rather than Historian but using archive files in .d format. However, I no longer want the production PDC to generate these files and keep only those generated by the production Historian (the .d files are very large and are redundant with those of Historian).

Ideally, if it were possible that OpenPDC could read .d2 files as input, it would allow me to have only one replay server reading these files and running the oscillation detection algorithms… :slight_smile:

Thank you for your interest in the problem I am facing …