Copy WinCC archives into external database

Discussion about recent product features & solutions!
5 posts • Page 1 of 1
Nikolay
Posts:34
Joined: Tue Aug 21, 2012 7:10 am

Copy WinCC archives into external database

Post by Nikolay »

Dear colleagues.
There is the question: if I am using WinCC archives for storing data for 5 sec, 1 min, 1 hour trends, how can I export this data from archives into external database (PostGres)? Is there any query like “SELECT ALERT...” except “SELECT ARCHIVE...” ? Or the only way is using dpConnect() for every archival datapoint?
This is an example of datapoint with statistical function, the goal is to write it not only in WinCC archives, but in PostGres too.
Attachments
45778A43-85DB-4BE3-9884-A91F042BC3E3.jpeg

fmulder
Posts:330
Joined: Wed Feb 03, 2010 9:46 am

Re: Copy WinCC archives into external database

Post by fmulder »

I don't believe there's a standard solution for this.
We've made several custom solutions:
1) We made a script to write to an external MS-SQL
2) We made script that produce CSV that are then read by an external database
3) We're planning a c# manager to do a big dpQueryConnect() and then write to MS-SQL

Sorry. You'll have some work to do !

Maybe the new archiving NGA (InfluxDB) might help you. There are various tools to transport data from InfluxDB to other db's

Share the fun
Frenk Mulder

Nikolay
Posts:34
Joined: Tue Aug 21, 2012 7:10 am

Re: Copy WinCC archives into external database

Post by Nikolay »

Thank you for the answer!
This situation definitely is not ordinary.

gschijndel
Posts:376
Joined: Tue Jan 15, 2019 3:12 pm

Re: Copy WinCC archives into external database

Post by gschijndel »

The DBLogger copies archives into an external database, which could be modified to archive into a PostgreSQL database.
The current roadmap contains PostgreSQL archiving for 3.18.

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Copy WinCC archives into external database

Post by leoknipp »

Nikolay wrote: ↑ Tue May 26, 2020 12:45 pm There is the question: if I am using WinCC archives for storing data for 5 sec, 1 min, 1 hour trends, how can I export this data from archives into external database (PostGres)? Is there any query like “SELECT ALERT...” except “SELECT ARCHIVE...” ?
The part of the query string you have posted refers to alert information (SELECT ALERT).
If you want to get historical data (not alerts) you have to use SELECT and a TIMERANGE condition.

Best Regards
Leopold Knipp
Senior Support Specialist

5 posts • Page 1 of 1