I do not need the old data, just need to reset the tables.
I messed up deleting sqlt_data tables after setting the pruning options. Now it will only create a table called sqlth_1_data and no data can be forwarded to it.
I had tried disabling the Datasource History Provider, changing the Partition Length and Prune Age Units, stopping and starting the gateway, then enabling the Datasource History Provider, but that did not work.
Just now I again, disabled the Datasource History Provider, but this time rebooted the server, then enabled the Datasource History Provider and now it seems to be working.
I'd still like to know if there is a way to reset all the Historian tables and start from scratch? To get rid of any logged data and retired tags and so on.
I had set it to prune after 5 minutes and a partition size of 5 minutes. So after it created the new table, I expected it to delete the other tables. I guess I didn't wait long enough maybe. I had also removed them from the partition table but it just made the one new data table and couldn't put any data in it. Until I did as I described above.
I did find another thread where folks were describing this and they just set the pruning really low to get rid of the old Data tables that they didn't want but then you still can have issues with tags that you renamed or moved or whatever that have or have not been retired etc. I was wondering if there was a way to just reset everything?
The partitions will only be pruned when the newest data inside is older than the prune age.
It would be uncommon to want to remove all data and reset the historian so I don't know of any built in ways to do this.
If you delete all of the sqlth tables and reset the historian module they will be rebuilt. Including the sqlth_te (tags) table.