We need to migrate a series of projects to a new gateway. These projects use a lot of tags where history is enabled. We would like to keep the history data.
To accomplish this task we moved the projects but we kept the history database. The objective is that the tags on the new server uses the same history database of the old ones.
We tried with only one tag just to understand if it works and we discovered that the history is missing.
Looking at history DB we realize that each tag history is related not only to the tag path but also to gateway name. The sqlth_drv table contains both new and old server name. The sqlth_scinfo table has a new record related to new server. In the sqlth_te table all tags are related to the old gateway except for the test tag that is related to new gateway.
We think that could be possible to change the gateway ID (drvid) in sqlth_scinfo table to make all tags related to old server pointing to the new one. But this could seam a potentially harmful solution.
Is there a safe way to keep history when migrating to new gateway?