I need to clear up some space on our production database. Currently, even HMIs that are in development store tag history in the production DB.
I'd like to clear out some old tables from one of our sites. I understand the table naming convention using the DRV ID as the first number, followed by year and month.
If I simply drop the oldest table with the matching DRV ID, will this have any effect on the system or perspective app? Is there anything else I would need to do or watch out for? Also, can this be done directly from the DB Query Browser in the designer?
You'll want to drop the record from sqlth_partitions
that says "there's data for this time range in X table" at the same time you drop an actual sqlt_data_X_Y
table. Which is what pruning would do for you, but you certainly can do it manually, as well.
Thanks!
Regarding pruning. If I enabled this, wouldn't it remove tables that match the criteria across drivers? I only want to remove old data from one or two specific drivers.
Pruning doesn't know anything about drivers. All it knows is the history provider name (the database) and the pruning settings. The default is that history is broken into monthly files and pruning is done after so many months. There is no built-in way to delete historical data by OPC device name or path.