Archiving

How can I check if my Oracle DB for RDB is available?

Many reasons could be responsible for an interrupt of the connection between the WinCC OA RDB manager and an Oracle DB. Some of the reasons are a broken network or a stopped Oracle Server.

To detect an Oracle Error, it is possible to implement an own Oracle Server Watchdog within a CTRL script from WinCC OA.

Inside this script an endless loop should be implemented which trigger a periodic SQL statement in Oracle like this example:

main()
{
  dyn_dyn_anytype dda;
  while(1)
  {
    runRealSQLQuery("SELECT 2 FROM DUAL", dda);
    //make activities for content of dda variable
    delay(60);
  }
}

In case where the Oracle connection is OK, the “dda” variable is filled with values otherwise it is empty. In decency of the content of this variable it is possible to set an own datapoint with an alert handler config. With this alarm it is possible to inform the operator about an Oracle Error as fast as possible.

How to keep one year of value archives online - what's a suitable backup strategy?

To have one year of archive data online and all other data on a backup drive, the following example settings can be used for the value archive. On usage of more archive managers, the same strategy can be applied on each of them.

Example of daily file switch, 1 year online, backup every week, correction values allowed for last 7 days:

If it has been decided to have daily archive switched, it should be set to once a day for example at 4:00 am.

The compression step 1 could be set to 1 to keep the memory usage on hard disk small as possible.

For compression step 2, the value needs to be bigger than the value for compression step 1, in our example it could be set to 7 to allow setting correction value for the last week.

By setting the backup interval to weekly at 5:00 am (after the daily archive switching time!), the archives will be copied to backup directory every week.

Note: to avoid single point of failure, the backup directory should not be on the same computer or same hard disk as the project!