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.
Copy WinCC archives into external database
- Nikolay
- Posts:34
- Joined: Tue Aug 21, 2012 7:10 am
- fmulder
- Posts:330
- Joined: Wed Feb 03, 2010 9:46 am
Re: Copy WinCC archives into external database
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
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
Thank you for the answer!
This situation definitely is not ordinary.
This situation definitely is not ordinary.
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: Copy WinCC archives into external database
The part of the query string you have posted refers to alert information (SELECT ALERT).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...” ?
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