# Does Historian need the d2 file archive when used with an SQL database?

**URL:** <http://discussions.gridprotectionalliance.org/t/does-historian-need-the-d2-file-archive-when-used-with-an-sql-database/640>\
**Category:** openHistorian\
**Created:** [February 16, 2020, 5:10pm UTC](http://discussions.gridprotectionalliance.org/t/does-historian-need-the-d2-file-archive-when-used-with-an-sql-database/640 "2020-02-16T17:10:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sms65](http://discussions.gridprotectionalliance.org/letter_avatar_proxy/v4/letter/s/e47774/32.png) [@sms65](http://discussions.gridprotectionalliance.org/u/sms65)\
**Post date:** [February 16, 2020, 5:10pm UTC](http://discussions.gridprotectionalliance.org/t/does-historian-need-the-d2-file-archive-when-used-with-an-sql-database/640/1 "2020-02-16T17:10:23Z")

</div>

Hi all

I am using OpenHistorian with a Postgress SQL database and a small number of PMUs.

The d2 file archive is taking a lot of space as I am using historian to store a number of power system parameters in high resolution (100/frame).

My question is whether openhistorian needs the d2 file archiving too when used with a database. I just want to be able to retrieve data for a couple of power system parameters from a couple of PMU devices and export it to CSV for historical time periods using the web interface of historian. Is the archiving needed for this?

Thanks in advance for any advice.

Stavros

---

<div class="post-metadata">

**Author:** ![StephenCWills](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/stephencwills/32/20_2.png) [@StephenCWills](http://discussions.gridprotectionalliance.org/u/StephenCWills)\
**Post date:** [February 17, 2020, 2:55pm UTC](http://discussions.gridprotectionalliance.org/t/does-historian-need-the-d2-file-archive-when-used-with-an-sql-database/640/2 "2020-02-17T14:55:31Z")

</div>

Hi Stavros,

Yes, in order to export to CSV using the openHistorian web interface, you will need to use the local historian which archives your data in the `.d2` files you mentioned. The web interface interacts with the local historian to retrieve data from the archive and put it in the exported CSV files. If you were to use a PostgreSQL database instead, you would need to develop your own process to get the data from there into a CSV file.

Thanks,  
Stephen

---

<div class="post-metadata">

**Author:** ![leticia\_acs](http://discussions.gridprotectionalliance.org/letter_avatar_proxy/v4/letter/l/3ec8ea/32.png) [@leticia\_acs](http://discussions.gridprotectionalliance.org/u/leticia_acs)\
**Post date:** [December 9, 2024, 1:33pm UTC](http://discussions.gridprotectionalliance.org/t/does-historian-need-the-d2-file-archive-when-used-with-an-sql-database/640/3 "2024-12-09T13:33:23Z")

</div>

Hello!

So, I have a question that’s related to this topic.

I just configured openPDC and openHistorian so that openPDC is getting data from a PMU and it’s distributing it to openHistorian (SQL Server database). I couldn’t find out how to export the data in .d2 files to csv using the web interface or how to retrieve the data at all. How do I do that? And I also don’t know if the data is actually being archived in this file, since I don’t know what’s inside. How do I make sure my data is being recorded?

---

<div class="post-metadata">

**Author:** ![leticia\_acs](http://discussions.gridprotectionalliance.org/letter_avatar_proxy/v4/letter/l/3ec8ea/32.png) [@leticia\_acs](http://discussions.gridprotectionalliance.org/u/leticia_acs)\
**Post date:** [December 9, 2024, 2:26pm UTC](http://discussions.gridprotectionalliance.org/t/does-historian-need-the-d2-file-archive-when-used-with-an-sql-database/640/4 "2024-12-09T14:26:02Z")

</div>

Hey!  
Just some updates.  
I used GEPDataExtractor and HistorianView and i think my application is not recording any data. I can see in the graph measurement on openPDC and also on openHistorian, but the data is not being recorded. That’s my main problem now

 ![image](http://discussions.gridprotectionalliance.org/uploads/default/original/2X/2/217acc6240db4d5529a103d4ddcfd7d8b213bee3.png)

---

<div class="post-metadata">

**Author:** ![StephenCWills](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/stephencwills/32/20_2.png) [@StephenCWills](http://discussions.gridprotectionalliance.org/u/StephenCWills)\
**Post date:** [December 10, 2024, 3:15pm UTC](http://discussions.gridprotectionalliance.org/t/does-historian-need-the-d2-file-archive-when-used-with-an-sql-database/640/5 "2024-12-10T15:15:12Z")

</div>

> [@leticia\_acs](#):
>
> How do I make sure my data is being recorded?

In openHistorian Manager, navigate to `Outputs > Historian Instances` in the menu. By default, you should have a historian instance called `PPA` of type `openHistorian.Adapters.LocalOutputAdapter`. Unless you changed it, archived data should go to `C:\Program Files\openHistorian\Archive`. If your openHistorian instance is _not_ archiving data, that folder would be empty.

Thanks,  
Stephen

---

<div class="post-metadata">

**Author:** ![leticia\_acs](http://discussions.gridprotectionalliance.org/letter_avatar_proxy/v4/letter/l/3ec8ea/32.png) [@leticia\_acs](http://discussions.gridprotectionalliance.org/u/leticia_acs)\
**Post date:** [December 10, 2024, 4:29pm UTC](http://discussions.gridprotectionalliance.org/t/does-historian-need-the-d2-file-archive-when-used-with-an-sql-database/640/6 "2024-12-10T16:29:07Z")

</div>

Okay, I think the problem was on the PPA, just as you said. Now it’s working, thank you!!
