Oracle clean-up after WinCC OA database project re-built

Find and share HowTos to various installations / configurations!
1 post • Page 1 of 1
NikolayLevchenko
Posts:74
Joined: Wed May 10, 2017 3:34 pm

Oracle clean-up after WinCC OA database project re-built

Post by NikolayLevchenko »

Hi,

I'd love to hear from ETM or someone else with experience using WinCC OA with Oracle.

Question: Is there a "proper" way tpo clean up Oracle schema after re-building WinCC OA database?

Details:
If I understand things correctly, when I use Oracle for history, all the data is stored in various tables, names of which are based on my Archiving Groups naming.

The data is stored NOT using DPE names (text) but using element ID's (numbers). These numbers are listed in special table ELEMENTS where each number has a matching DPE name (text).
Additionally, there are similar tables with DP id's, DPE id's and DPT id's.

If I understand correctly, all these id's are coming from WinCC OA. Basically, when I create a new DP and set it's element to be archived, its id gets added to Oracle tables for archiving purposes.

So far, pretty clear.

Now, lets imagine a real world situation where, during the development of the project, I need to re-build my WinCC OA database. There might be multiple reasons for this (adding/deleting/renaming of multiple DP's, we might have other reasons to re-build the DB from scratch (project got corrupted, etc.). Anyway, anyone who built a big project knows it happens.

We generate our entire DB via ASCII import and create the ASCII files using external tools (Excel, etc.). The next step would be to import ASCII files into WinCC OA. This, would create all the DP's and in my understanding create them with NEW id's. This would mean that these new id's will be added to Oracle tables (ELEMENTS, DP, DPT, DPE, MAP_ELEMENTS).

Of course my OLD history is now effectively lost to WinCC OA, since OLD records in (for example) ALERTHISTORY_xxxxxxxx table have OLD element id's. I can live with that during the development. But my main question is: is this process OK from Oracle perspective or should I do some clean up?

I now have some DPE names that are listed twice in table ELEMENTS with different id's. All the new history is logged in Oracle using the new ID but the old Id is still there (in ELEMENTS and in old historical tables), is that a problem? Does it need any "clean up".

To summarize, if I rebuild my WinCC OA DB from scratch, do I need to do anything with my existing Oracle schema or not?

1 post • Page 1 of 1