Migrating a Tag and its Data

About this task

If you want to separate a single large user data store of tag into multiple smaller data stores on the same machine, and if your software license allows it, then you should assign the tag to the new data store and then migrate the data.

Consider when data is collected for the year 2009 in Tag1. The collected data is archived in the default User data store. If you want to move Tag1 residing in the User data store to another data store, (for example, the Motor data store), then you must create the Motor data store if it does not already exist and if your license allows it.

The next step is to change the data store of the tag. You can change the data store of the tag either using Historian Administrator or using Excel Tag Import. The new incoming data gets collected in the Motor data store. If you do a raw data query, you will get only the latest data and the previous data will not be available. To get the old data, you must migrate the data residing in the User data store to the Motor data store.

To migrate a tag and its data from one data store to another data store on the same server:

Procedure

  1. Use iharchivebackup -c to make a backup of the .ihc file.
    The backup of the Config file is automatically created in the Archives folder.
  2. In Historian Administrator, back up each archive from oldest to newest.
  3. Launch the Migration Tool (MigrateIHA.exe for 32-bit or MigrateIHA_x64.exe for 64-bit) using Administrator privileges.
  4. Select Options > Configure Options.
  5. In the Server pane, enter the Server name.
  6. In the Options pane, enter the IHC File path in the Config File path field, using the browse button. This is the path to the IHC backup that you made in step 1.
  7. In the Tags to Migrate pane, select the Migrate Using Tag Mask option and enter the Tag Name you moved to the new data store.
  8. In the Time to Migrate pane, ensure the Use IHA TimeFrame option is selected.
  9. Select File > Migrate Historical Data.
  10. Select the archive file that you backed up in Step 2 and monitor the progress of the migration. When the migration is complete, query the data to see the migrated data can be queried. Repeat with the remaining archives from oldest to newest.

What to do next

As needed, perform calculations on the migrated data. Ideally, you must create an archive already to store the calculated data. For unsolicited calculation tags, migration of data will cause the calculation to be triggered automatically for the time associated with the migrated data points. Archives will potentially grow beyond the configured default size. To avoid this issue, adjust the value for the DataIsReadOnlyAfter field on the Security section of the Data Store Maintenance page of Historian Administrator (or the ActiveHours property) so that the value is large enough to contain the calculated data. By default, this value is 1 month.