System: Perform Database Maintenance
Perform Database Maintenance (DBMAINT via script) is a system-level command that triggers the service to maintain the SQL database in accordance with specified parameters and system data retention periods.
Note: If you are using the FMS internal database, use the FMS Internal Database Manager utility to perform database compaction and reindexing tasks. See FMS Internal Database Manager Utility for more information.
You must have proper security authorization to execute this command. See FMS Security (and CMDSYS security event) for information about configuring security access for FMS commands.
See Configuring Database Maintenance Retention Periods and Running Database Maintenance Commands for more information about running this command via FMS Explorer.
See Scheduling FMS Command Tasks in the MSS for more information about scheduling commands.
See FMS ActiveX Controls and CxHmiFms for more information about using commands via FMS ActiveX controls on CygNet Studio or CygNet Vision screens.
See CxFms for more information about scripting commands.
Managing Database Maintenance Commands
Prior to performing database maintenance tasks, consider the impact of configured retention periods for various transaction logs, and (if configured) the data synchronization relationship(s) between Master and Slave service(s) in your system.
Retention Periods
Prior to running Perform Database Maintenance commands, configure the database maintenance retention periods that are referenced by the parameters. Retention periods are configured by users with proper security access, via the Extended Options button on the FMS Explorer Commands menu. See Configuring Database Maintenance Retention Periods for more information.
Replicated Services
If you have set up data synchronization and replication for your FMS system, be aware that results of the Perform Database Maintenance command will not automatically be replicated from the Master FMS to any Business Slave FMS services.
When you perform database maintenance for a Master FMS Service, database maintenance is performed separately for each Slave service as follows.
- DR Slave - You don't run the Perform Database Maintenance command against against any DR Slave service, as it inherits database changes from the Master service.
- Business Slave - You can optionally choose to run the Perform Database Maintenance command against any Business Slave service, to similarly maintain its database.
See FMS Data Synchronization for more information about replication in CygNet Measurement.
Command Definition Properties
The following command definition properties apply to Perform Database Maintenance commands, when scheduling, creating, or editing commands via CygNet Explorer.
| Property | Description |
|---|---|
|
FMS service |
Select a Site.Service for the command from the available FMS service list in the drop-down menu. |
|
Command |
Select the desired Command name from the drop-down menu. See FMS Commands for more information about available command types. |
|
Priority |
Select a processing queue Priority for the command from the drop-down menu. Options from least to greatest priority are as follows.
Default value is Low level processing queue priority. |
|
Logging |
Select a Logging level for the command results from the drop-down menu. Options are as follows.
Default value is Low level logging when scheduling a command via the MSS in CygNet Explorer. Default value is High level logging when creating or running an ad-hoc command in FMS Explorer or via the FMS in CygNet Explorer. |
Command Parameters
Note: Additional Perform Database Maintenance options are defined through the FMS Explorer Commands menu via the Extended Options button, prior to running the command. See Configuring Database Maintenance Retention Periods for more information.
The following command parameters apply to Perform Database Maintenance commands, when scheduling, creating, or editing commands via CygNet Explorer or scripting.
| Parameter | Description | Type | Required | Usage Notes |
|---|---|---|---|---|
|
DelExpCmd |
Delete expired command history |
String Enum |
Optional |
If set to Yes, deletes from the database all command history records, that are older than the specified number of days. Prior to running a database maintenance command, verify or configure the database maintenance retention periods. Retention period is configured per command type by users with proper security access, via the Extended Options button on the Commands menu. See Configuring Database Maintenance Retention Periods for more information. Double-click to access the Delete Expired Command History dialog box. Select one of the following options.
This parameter is optional. |
|
DelExpCQ |
Delete change queue entries |
String Enum |
Optional |
If set to Yes, deletes change queue entries from the database, according to limits set by the change queue keywords in the configuration file (fms.cfg). Double-click to access the Delete Change Queue Entries dialog box. Select one of the following options.
This parameter is optional. |
|
DelExpData |
String Enum |
Optional |
If set to Yes, deletes all expired device data and associated normalization views from the database when database maintenance is performed. Prior to running a database maintenance command, verify or configure the device data retention period (DATA_RETENTION keyword) configured in the FMS configuration file (CygNet\Services\FMS\fms.cfg). The value of the keyword defines what “expired” device data means in this context. See FMS Configuration File Keywords for more information. Double-click to access the Purge Expired Device Data dialog box. Select one of the following options.
*Notes: When expired device data is purged from the database, the last configuration record (with a timestamp prior to the remaining history records) will be retained. To remove device data from the database, but retain it in another storage medium, use the Archive Data command. See Archiving CygNet Measurement Data for more information. This parameter is optional. |
|
|
UpArchives |
Update archived databases |
String Enum |
Optional |
If set to Yes, updates archived database files to the current database version. Double-click to access the Update Archived Databases dialog box. Select one of the following options.
This parameter is optional. |


