Promotic

Backup data saving into the dBase database (Database dBase backups) - configuration window

Description:
The window serves for setting the parameters of data storage into the dBase database. This technology is used to store the data into tables (dBase files *.dbf), the name beginning with a prefix defined in the "Backup name prefix (dBase file)" configurator.
The size of one table and its maximum number is defined. If one table (backup) in the database is filled up (the size of data in the table exceeds the defined value), then a new table is created into which it is written from this moment. This walkthrough repeats all over again.
Note:The size of one backup (of the *.dbf file) can be set to unlimited and new backups are then created by calling the BackupCreate method.
Caution: Two different PmaTrendGroup objects should not be set to save the data into the same folder on the disk. Otherwise the first characters of the backup filenames would have to be different making the number of saving files very high and significantly increasing the processing power needed to manage the backup saving.
The name of the variable on the "Data" tab can be maximum 11 characters long (the length of column name in the dBase table is limited).
Configurators:
Data source (ConnectionString)Text string used for connection to the data source using the PROMOTIC technology (not ADO). The same syntax is used in order to keep it simple.
Macro expression can be used for input (it is evaluated after the application is launched). For example $.join("Data Source=",$.path("data","Trend/"),$.expr("pMe.GroupId"),"/;")
Data Source - The disk folder to be used for dBase data files (*.dbf) creation and storage. If there are more PmaTrendGroup objects present in the application, then each must save the data into separate folder on the disk, or the starting characters of the backup filenames must differ. This configurator must not contain an empty string.
Additional parametersAdditional parameters for storing. Allows to define names and data types of system columns, database types based on the trended value data type. Available parameters are shown in the following example together with their preset values for selectaed saving type (plugin). These values may not be entered. Enter the values only if non-default are needed. Entries are in the KeyVal format, for example "coltimename:pm_time;colattrname:pm_attr;dbdt.f64:NUMERIC(12,4);dbdt.f32:NUMERIC(8,2);dbdt.i32:NUMERIC(10,0);dbdt.i16:NUMERIC(5,0);dbdt.u8:NUMERIC(3,0);dbdt.b:NUMERIC(3,0);".
Macro expression can be used for input (it is evaluated after the application is launched).
coltimename (optional) - Name of the column containing the record timestamp.
Default "coltimename:pm_time;".
colattrname (optional) - Name of the column containing the record attribute.
Default "colattrname:pm_attr;".
dbdt.f64 (optional) - Database data type of the column for trended variable of the data type: Float64 (Double).
This is used if the trended value does not have its database data type defined.
Default "dbdt.f64:NUMERIC(12,4);".
dbdt.f32 (optional) - Database data type of the column for trended variable of the data type: Float32 (Single).
This is used if the trended value does not have its database data type defined.
Default "dbdt.f32:NUMERIC(8,2);".
dbdt.i32 (optional) - Database data type of the column for trended variable of the data type: Int32 (Long).
This is used if the trended value does not have its database data type defined.
Default "dbdt.i32:NUMERIC(10,0);".
dbdt.i16 (optional) - Database data type of the column for trended variable of the data type: Int16 (Integer).
This is used if the trended value does not have its database data type defined.
Default "dbdt.i16:NUMERIC(5,0);".
dbdt.u8 (optional) - Database data type of the column for trended variable of the data type: Uint8 (Byte).
This is used if the trended value does not have its database data type defined.
Default "dbdt.u8:NUMERIC(3,0);".
dbdt.b (optional) - Database data type of the column for trended variable of the data type: Bool (Boolean).
This is used if the trended value does not have its database data type defined.
Default "dbdt.b:NUMERIC(3,0);".
pm8mode - Provided full compatibility with older PROMOTIC versions (version 8.3 and older). When reading the trend values, the dBASE column is not identified by its name, but only by the order of registered ExtTrend in the PmaTrendGroup object. based on this it is possible to render also the trends that have column names longer than 10 characters, but it was not possible to add or remove trends in the middle. It means that the trend name and the dBASE column name differed. If in the old application the column names were not exceeding 10 characters then it is not necessary this compatibility mode. From PROMOTIC version 9 the column in each backup is searched separately by the name which may cause changed order of the saved columns. It is also now possible to use the full length of the column name, i.e. 11 characters. Caution: When converting the application from version 8.3 to version 9, this compatibility mode is enabled automatically.
Backup name prefix (dBase file)First part of the backup (dBase file) filename. The whole filename consists of this prefix followed by time string, displaying the time of backup creation, for example trend2007-01-15_18-45-43.dbf.
The backup names creation can be changed in the onBackupCreate event, i.e. using self defined backup names.
Macro expression can be used for input (it is evaluated after the application is launched).
Note! If the trend is in the mode "Read only (new records cannot be written)" (see the "Read only (new records cannot be written)" configurator), then there can be a reference to a single specific *.dbf file by entering the whole path and filename (e.g. using the #data:). The "Data source (ConnectionString)" configurator is not filed in this case. This configurator must not contain an empty string.
Backup creation is defined by records countIf checked, then the backup (creating new file) is performed on achievement of specified record number. If not checked, then the backup size is not limited by record count.
Number of recordsThe size of one backup (i.e. table) is defined by the record count.
If the backup size defined here is exceeded when writing new record, then new empty table is created and the new record is saved here. Following records are saved into this new backup since this moment.
Backup creation is defined by time spanIf checked, then the backup (creating new file) is performed periodically with the defined period (every year, month, week, day, hour, minute). If not checked, then the backup size is not limited by time range.
Time spanThe backup (i.e. table) size is defined by time span.
If the backup time-range in the table defined here is exceeded when writing new record, then new empty table (*.dbf file) is created and the new record is saved here. Following records are saved into this new backup since this moment.
1 year
1 month
1 week
1 day
1 hour
1 minute
The total number of backups is limitedIf checked, then the maximum number of the backup count is limited. If this number of files is achieved, then the oldest backup file is replaced by the newest one. If not checked, then the backups count is not limited.
Maximum number of backupsMaximum number of backup files. By continual writing, new tables (backups) are created. Their maximum number is defined by this configurator. If there is defined, for example, the maximum number of backups to 10 and 11th backup is created, then the backup with the oldest data is removed and the backups count is still only 10.

History:
Pm9.00.11: New option pm8mode in the "Additional parameters" configurator, providing full compatibility with applications in version 8.3 and older.
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.