Alarm and Event Archive Migration
Backing Up Alarm and Event Data
If you are upgrading to the newest version of Historian and you have already collected alarms, you can migrate the Historical Alarm and Event data after upgrading to latest version of Historian. Alarms are not available for retrieval until they are migrated. New alarms collected with the new version of Historian will be available immediately.
To migrate your alarms into the new alarm database, you must do a backup of the old alarms and restore them into the new database. The backup can be done before upgrade using the Historian Administrator or it can be done after upgrade using the Proficy Alarm Database Migration Tool on the start menu.
To back up the alarm and event data:
- Click the Backup Existing Alarms and Events tab.
- In the Time Range section, in the From and To fields, set the start time and end time. You may need to migrate small time periods if you have many alarms. If you need to migrate the alarms in blocks of time, do the oldest alarms first.
- In the Database Name field, enter the name of the database from which you have to backup the data. Typically, this will be the same as the SQL Server you are currently using.
- Select either windows or SQL server authentication by selecting the Use Windows Authentication or Use SQL Authentication options.
- In the User Id and Password fields, enter the login credentials. Be sure to use a user name with permission to connect and backup alarms.
- In Backup Folder Path field, give the absolute path, including file name, to store the backed up alarms. For example, c:\temp\March2010.bak. Provide the path to place the backup folder on the local computer and if your SQL server is running on a remote computer, enter a path that exists on the remote computer.
- Click the Test Connection button to check that the source database is active and the information is accurate. The Begin Backup button is activated.
- Click the Begin Backup button to backup the alarms and when the backup is complete, you will get a count of rows backed up.
Migrating Historical Alarm and Event Data
To make the backed up alarms available for retrieval, you have to write them into the current alarm database.
To migrate Historical Alarms and Events to the latest version of Proficy Historian:
Command Line Support for Alarm Migration Tool
If you are using the Alarm Migration Tool using the command line, you can use the following command line switches (case does not matter):
Required Switches
Switches | Description |
---|---|
/TASK |
Command to be executed (for example BACKUP 0r RESTORE). |
/SERVER |
SQLServer Name (for example usgb021). |
/DBNAME |
Database Name (for example AEDatabase). |
/SDATETIME |
mm/dd/yyyy HH:MM:ss format (for example "5/21/2012 10:20:30"). Alarms & Events recorded from this time will be considered. This option is mandatory only when used with BACKUP command. |
/EDATETIME |
mm/dd/yyyy HH:MM:ss format (for example "5/25/2012 10:20:30"). Alarms & Events recorded till this time will be considered. This option is mandatory only when used with BACKUP command. |
/BKPPATH |
Fully qualified path of the .dat file where the backup of the Database will be taken. This switch is mandatory only when used with BACKUP command. |
/RSTPATH |
Fully qualified path of the .dat file from where the Database will be restored. This switch is mandatory only when used with RESTORE command. |
/USERNAME |
User Name (for example sa) used to connect to SQL Server using SQL Authentication. If this switch is not provided then Windows Authentication is used to connect to SQL Server. |
Optional Switches
Switches | Description |
---|---|
/PWD |
Password (for example Pr0f1cyhist) Default is empty string (no password is okay, but not recommended for security reasons). If you want the password to be blank, simply skip using this switch. |
Examples
BACKUP Operation using SQL Authentication:
Proficy.Historian.AandE.Migration.exe /TASK=Backup /SERVER=CPHIST45\PROFICYHIST /DBNAME=CPHIST45_plantdatabase /SDateTime="3/9/2013 21:00:00" /EDateTime="3/9/2013 23:59:59" /BKPPATH=C:\temp\PDB_0309.dat /USERNAME=sa /PWD=Pr0f1cyhist
BACKUP Operation using Windows Authentication:
Proficy.Historian.AandE.Migration.exe /TASK=Backup /SERVER=Domain\Node /DBNAME=AEDB /SDateTime="5/10/2012 10:20:30" /EDateTime="6/10/2012 10:20:30" /BKPPATH=E:\DBBkpPath\AEDB_1.dat
RESTORE Operation using SQL Authentication:
Proficy.Historian.AandE.Migration.exe /TASK=Restore /SERVER=CPHIST45\PROFICYHIST /DBNAME=CPHIST45_AEDatabase /RSTPATH=C:\temp\PDB_0309.dat /USERNAME=sa /PWD=Pr0f1cyhist
RESTORE Operation using Windows Authentication:
Proficy.Historian.AandE.Migration.exe /TASK=RESTORE /SERVER=Domain\Node /DBNAME=AEDB /RSTPATH=E:\DBBkpPath\AEDB_1.dat
Multiple Backups Using a Batch File:
cd C:\Program Files\Proficy\Proficy DataBase
start/b/wait Proficy.Historian.AandE.Migration.exe /TASK=Backup/SERVER=CPHIST45\PROFICYHIST /DBNAME=CPHIST45_plantdatabase /SDateTime="3/9/2013 21:00:00" /EDateTime="3/9/2013 23:59:59" /BKPPATH=C:\temp\PDB_0309.dat /USERNAME=sa /PWD=Pr0f1cyhist
start /b /wait Proficy.Historian.AandE.Migration.exe /TASK=Backup /SERVER=CPHIST45\PROFICYHIST /DBNAME=CPHIST45_plantdatabase /SDateTime="3/10/2013 00:00:00" /EDateTime="3/10/2013 02:00:00" /BKPPATH=C:\temp\PDB_0310_1.dat /USERNAME=sa /PWD=Pr0f1cyhist
start /b /wait Proficy.Historian.AandE.Migration.exe /TASK=Backup /SERVER=CPHIST45\PROFICYHIST /DBNAME=CPHIST45_plantdatabase /SDateTime="3/10/2013 02:00:00" /EDateTime="3/10/2013 04:00:00" /BKPPATH=C:\temp\PDB_0310_2.dat /USERNAME=sa /PWD=Pr0f1cyhist
Multiple Restores Using a Batch File:
cd C:\Program Files\Proficy\Proficy DataBase
start/b/wait Proficy.Historian.AandE.Migration.exe /TASK=Restore /SERVER=CPHIST45\PROFICYHIST /DBNAME=CPHIST45_AEDatabase /RSTPATH=C:\temp\PDB_0309.dat /USERNAME=sa /PWD=Pr0f1cyhist
start /b /wait Proficy.Historian.AandE.Migration.exe /TASK=Restore /SERVER=CPHIST45\PROFICYHIST /DBNAME=CPHIST45_AEDatabase /RSTPATH=C:\temp\PDB_0310_1.dat /USERNAME=sa /PWD=Pr0f1cyhist
start /b /wait Proficy.Historian.AandE.Migration.exe /TASK=Restore /SERVER=CPHIST45\PROFICYHIST /DBNAME=CPHIST45_AEDatabase /RSTPATH=C:\temp\PDB_0310_2.dat /USERNAME=sa /PWD=Pr0f1cyhist