PAKA-like Data Format Import Tool
This application can be used to migrade extracted data in PAKA-like format to a new database which is suitable for the Historian application.
Application migrates all KKS to new database. Only events occuring in specified time range are migrated to new database.
The application can be found at shared DropBox folder (Dropbox\99 - Inflex\Historian Versions\PAKA-like Format Migration).
Application parameters
- AnalogueSourceConnection - connectionstring to the source database with analogue data in PAKA-like format
- BinSourceConnection - connectionstring to the source database with binary data in PAKA-like format
- TargetConnection - connectionstring to the target database which should exist. If there are missing tables in the target database, the app will create them
- Start - migration time range start (in the format "yyyy-MM-dd HH:mm:ss.SSSS")
- End - migration time range end (in the format "yyyy-MM-dd HH:mm:ss.SSSS")
- Process - all/analogue/binary (processes only analogue, binary or all data)
ConnectionString format is described here and typically contains following parameters:
- Server - server name
- Database - database name
- Uid - user login
- Pwd - password
- ConnectionTimeout - timeout for connection to the mysql database
- DefaultCommandTimeout - timeout for mysql to perform requested command
Incremental Conversion
Application can be launched recurrently in order to convert newly added data. However the following procedure must be used:
- The first conversion should be launched using the Start parameter set to a timestamp before the first event in the database and parameter End set to the timestamp of the last event in the database.
- Every following conversion should be launched with the Start parameter set to the value of the End parameter from the previous launch.
This procedure guarantees that there will be no duplicated events in the database. Generally speaking, you may launch the conversion utility with any Start-End combination you like, however you should bear in mind, that converting the same time multiple times will lead to copying the same events multiple times.
Also please note, that the conversion of any timerange should happend only after the time range is fully present in the source database and no further changes for this timerange will be made.
Application Parameters Sample
-AnalogueSourceConnection "Server=192.168.1.1;Database=MODpakaU5A;Uid=inflex;Pwd=heslo;ConnectionTimeout=360000;DefaultCommandTimeout=360000" -BinSourceConnection "Server=192.168.1.1;Database=AMpakaU5A;Uid=inflex;Pwd=heslo;ConnectionTimeout=360000;DefaultCommandTimeout=360000" -TargetConnection "Server=192.168.1.1;Database=PakaU5A;Uid=inflex;Pwd=heslo;ConnectionTimeout=360000;DefaultCommandTimeout=360000" -Start "2009-08-19 00:00:00.000000" -End "2019-08-20 00:00:00.000000"