Dear forum members and admins,
I have a problem with which I hope you can help me:
I want to extract data from old encrypted database files I have on a backup HDD in folders "VA_0001" and "VA_0002".
Usually, I use a self-written CTRL-script which performs SQL-queries for chosen data points in a certain time range and writes the time series in a csv-file. However, so far I have done this only for projects (and thus PARA data points) that were not changed since the archiving of the db files. I then load these files back in the current archive via archive configuration dialog (in system management -> database) and it works perfectly fine.
For the given files, however, the datapoint and archive configuration has changed which means that certain data points I want to extract do not exist anymore etc. I suppose that this is the reason why my method does not work.
Do you have any tipps how I could overcome this problem? Thanks in advance!
Edit: I am using version 3.11-SP1 and I do not have a Oracle database or whatsoever installed.
Edit 2: I already tried making new data points with the same names as the ones I want to extract from the old archive but that does not help either.
Retrieve data from old archive files
- RudiKreiner
- Posts:198
- Joined: Mon May 16, 2011 2:10 pm
Re: Retrieve data from old archive files
We have also run into this problem before. Creating new dpes with the same name doesn't help because they get new data points always get unique dpe ids (integer values) and it is these ids that are referred to in the archive files.
If you don't know which dpe id the deleted datapoints had, then I know of no way to map the names ot the valarch entries.
I know of no automatic way to get at this data but maybe ETM has some tricks up their sleeves.
One idea might be to start a project with an older backup db that still contains the dpes that you are interested in (if you have one), then import the archive files as usual.
If you don't know which dpe id the deleted datapoints had, then I know of no way to map the names ot the valarch entries.
I know of no automatic way to get at this data but maybe ETM has some tricks up their sleeves.
One idea might be to start a project with an older backup db that still contains the dpes that you are interested in (if you have one), then import the archive files as usual.
- cpollak
- Posts:21
- Joined: Wed Sep 25, 2013 11:31 am
Re: Retrieve data from old archive files
Thank you for your answer!
Do you know where and in which file in the project folder the DP(E) info (incl. ID) is stored?
Do you know where and in which file in the project folder the DP(E) info (incl. ID) is stored?
- fmulder
- Posts:330
- Joined: Wed Feb 03, 2010 9:46 am
Re: Retrieve data from old archive files
The DP (and their ID's) are defined in the standard RAIMA database. I don't believe that there is one specific file and I'm pretty sure that you wont be able to just open is.
I agree with the previous post:
* Restore an older project
* Import the archives there and then 'script' your own ascii export
We have our own procedures to create or alter datapoints. The best advise that I can give you is : never delete a datapoint. Our engineering tools will only work at differences.
* Create datapoints that you don't already have
* Change datapoint types to a new structure
Deleting datapoints will normally mean that you loose the history.
We are currently using an Oracle RDB solution and are quite happy with that. I guess that in an Oracle solution you might have fixed this easier.
Good luck
Frenk
I agree with the previous post:
* Restore an older project
* Import the archives there and then 'script' your own ascii export
We have our own procedures to create or alter datapoints. The best advise that I can give you is : never delete a datapoint. Our engineering tools will only work at differences.
* Create datapoints that you don't already have
* Change datapoint types to a new structure
Deleting datapoints will normally mean that you loose the history.
We are currently using an Oracle RDB solution and are quite happy with that. I guess that in an Oracle solution you might have fixed this easier.
Good luck
Frenk
- RudiKreiner
- Posts:198
- Joined: Mon May 16, 2011 2:10 pm
Re: Retrieve data from old archive files
I also try to avoid deleting datapoints wherever possible.
Sometimes we have the need to rename existing datapoint elements and I try to do this using the rename functions in the PARA tool, which will preserve the element ids, associated archive channel entries, alert configs, address configs, etc. After the rename I just then need to import the new descriptions and alert messages, because they are derived from the datapoint names ( because that is the way our naming concept works)
If I do the rename in our external model then import it via the ascii manager, then it will delete the old dp, and create a new one with the new name and give it a new ID of course.
I can't really blame the ascii manager for that, because it has no way of knowing that I am trying to do a rename.
Also with this method the associated archive channels will be freed up and new ones allocated, so that if a bunch of deletes and creates are done at once, then there may not be enough free channels in the archive files until a file switch is done.
That is the technical explanation, then, for the guideline above, and also posted by Frenk.
Sometimes we have the need to rename existing datapoint elements and I try to do this using the rename functions in the PARA tool, which will preserve the element ids, associated archive channel entries, alert configs, address configs, etc. After the rename I just then need to import the new descriptions and alert messages, because they are derived from the datapoint names ( because that is the way our naming concept works)
If I do the rename in our external model then import it via the ascii manager, then it will delete the old dp, and create a new one with the new name and give it a new ID of course.
I can't really blame the ascii manager for that, because it has no way of knowing that I am trying to do a rename.
Also with this method the associated archive channels will be freed up and new ones allocated, so that if a bunch of deletes and creates are done at once, then there may not be enough free channels in the archive files until a file switch is done.
That is the technical explanation, then, for the guideline above, and also posted by Frenk.
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: Retrieve data from old archive files
Hello,
if you are using the ASCII-manager for renaming a datapoint you can get the same ID as before.
At the ASCII-export the ID is stored and if it not used when doing the import the I D will be used.
-- make an ASCII-export for the DP you want to delete (including the original values and configs)
-- delete the DP
-- change the ASCII file without changing or deleting the DP-ID
-- import the ASCII file
As the archive files and also the RAIMA database are not "human readable" there is no easy solution to read data from old archive files.
Probably the solution mentioned by Frenk (using an old backup of the database) is the easiest one.
Importing the files is only possible if the files are "known" by the system. "Known" in that case means that the index file AR_X (X is substituted with the archive number) has information for the archive file you want to import.
With some non official tools (e.g. va_util) it is also possible to read information from the archive files. You still need to know the DPE-IDs for the elements where you want to retrieve data.
As far as I know the colleagues at your company got this information how to retrieve data some years ago.
Best Regards
Leopold Knipp
Senior Support Specialist
if you are using the ASCII-manager for renaming a datapoint you can get the same ID as before.
At the ASCII-export the ID is stored and if it not used when doing the import the I D will be used.
-- make an ASCII-export for the DP you want to delete (including the original values and configs)
-- delete the DP
-- change the ASCII file without changing or deleting the DP-ID
-- import the ASCII file
As the archive files and also the RAIMA database are not "human readable" there is no easy solution to read data from old archive files.
Probably the solution mentioned by Frenk (using an old backup of the database) is the easiest one.
Importing the files is only possible if the files are "known" by the system. "Known" in that case means that the index file AR_X (X is substituted with the archive number) has information for the archive file you want to import.
With some non official tools (e.g. va_util) it is also possible to read information from the archive files. You still need to know the DPE-IDs for the elements where you want to retrieve data.
As far as I know the colleagues at your company got this information how to retrieve data some years ago.
Best Regards
Leopold Knipp
Senior Support Specialist