Overview of Database migration

Depending on changes brought to the archiving features, migrating to a newer version of PcVue can require changes to the HDS database schema for each of your databases.

2 mechanisms are available to ensure a smooth migration:

  • If the database size is less than 10 Gb, the conversion will happen automatically the first time that the project is started with the new version of PcVue. This may take several minutes during which time you must not restart the computer.
  • If the database size is greater than 10 Gb, the HDS will not start and you must use a T-SQL migration script to manually convert the historic data. The script is found in Bin folder and must be run using SQL Server Management Studio. If you are unsure about how to do that then please contact your Technical Support provider.

Before initiating either the automatic or manual conversion, you should ensure that the historic data files are backed up.

The following topics explain how HDS database structures and data can be migrated when starting PcVue with an application that used to be run with an earlier version:

These instructions are applicable in the following context:

    •  PcVue version 10.0 or upper using the Historical Data Server to archive data in a Microsoft SQL Server database.
    • Microsoft SQL Server: All editions, including SQL Server Express.

These instructions are not applicable if:

    • You intend to discard HDS archived data prior to the upgrade of an existing application.
    • You are working on a new application, without HDS archived data to preserve during the version upgrade phase.

In the following topics:

    • The Historical Data Server is referred to as HDS,
    • Microsoft SQL Server Management Studio is referred to as SSMS,
    • Transact-SQL script is referred to as T-SQL.

If your PcVue application takes advantage of multiple HDS databases and/or multiple SQL Server hosts, it is required to apply the following instructions to each HDS database on each SQL Server host.

Migration of Historic Data to Version 12

The HDS database table structures changed in version 12 as follows:

  • In the Log Table, the size of the LogList column increased to 100 characters.

If you have a project developed in a version earlier than 12, historic data has to be converted before it is compatible.

Migration of Historic Data to Version 11.2 (or later)

The HDS database table structures changed in version 11.2 as follows:

  • In the Log Table, the size of the AssocLabel column increased from 12 to 255 characters and the EvtTitle column increased from 24 to 255 characters.
  • In the Trend Table, the size of the AssocLabel column increased from 12 to 255 characters.

If you have a project developed in a version earlier than 11.2, historic data has to be converted before it is compatible.

Migration of Historic Data from Version 9.0 (or earlier) to Version 10.0 (or later)

Enhancement to the operation of the HDS means that the table structures used in version 9.0 and earlier are not compatible with those in version 10.0 and later. If you have a project developed in version 9.0 or earlier that is using the HDS, historic data has to be converted before it is compatible with version 10.0 or later.