Database scripts


I need to perform below activities in OpenHistorian SQL scripts.

  1. We are using SQL lite
  2. Need to add a new field “xName” in Pharsor at OpenHistorian.db

In order to perform this, I add new field at openHistorian.sql file and this file is present at OpenHistorian Installation location “C:\Program Files\openHistorian\Database Scripts\SQLite”

  1. I deleted existing “OpenHistorian.db” file
  2. Run the “ConfigurationSetupUtility.exe” file and reconfigured the database, but the new field is not added with Phasor table.

Also I want to add new sample data with Vendor table, for that I added new insert statement at “InitialDataSet.sql”, but my new record is not added in the vendor table.

Could you please clarify, why new field and new records are not getting updated?
Is there any other file to update before running “ConfigurationSetupUtility.exe”?

Thanks & Regards

After updating the openHistorian.sql file, you will need to run the following command line operations in the SQLite folder C:\Program Files\openHistorian\Database Scripts\SQLite:

DEL openHistorian.db
sqlite3 openHistorian.db < openHistorian.sql
COPY /Y openHistorian.db openHistorian-InitialDataSet.db
sqlite3 openHistorian-InitialDataSet.db < InitialDataSet.sql
COPY /Y openHistorian-InitialDataSet.db openHistorian-SampleDataSet.db
sqlite3 openHistorian-SampleDataSet.db < SampleDataSet.sql

After this, you can run ConfigurationSetupUtility.exe and your database changes will be applied.


Thanks for your information