Command Line Support for the 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