Step 2.5. Configure the Logging Maintenance Actions

Maintenance Actions define the type of actions that take place when a Maintenance Event occurs.

You can configure a data table to:

Export records to an export file,

Purge records from a logging table and/or

Incorporate command line actions.

Select the Maintenance Actions tab in the DATA_LOG Table Properties dialog box.

Options are as follows.

1

Delete actions

2

Export actions

3

Other actions

 

1

Delete actions

Delete actions specify the criteria for how many records will be retained when data is deleted from a logging table when a maintenance event occurs.

Options in the Delete actions group include:

Option

Description

Delete records

Determines the method of counting the number of records to retain in the table.

 

Checkbox

Check to enable Delete records.

 

Check either radio button.

 

By count

Delete all but the last (most recent)<n> records in the table.

 

By time

Delete all but the records entered in the table for the last <n> days, hours or minutes.

Save deleted in file

Saves the purged data to a .csv format file before removing it from the table.

 

Checkbox

Check to enable Save deleted in file.

 

Field

Name of the .csv file.

 

2

Export actions

Export actions specify how many records will be exported when a maintenance event occurs.

Export actions specify

Option

Description

Export records

Exports specified data.

Configuration includes:

 

Checkbox

Checked to enable Export records.

 

Check either radio button.

 

By count

Export last (most recent)<n> records in the table.

 

By time

Export all the table for the last <n> days, hours or minutes.

Save exported in file

Saves the exported data in a .csv file.

 

Field

Name of the .csv file.

 

3

Other actions

(Optional) Select one of the other actions.

Option

Description

Execute SQL command

Enables you to incorporate a SQL command line action.

Configuration includes:

 

Check box

Checked enables Execute SQL command

 

Field

Enter a SQL command

Example

Records should be counted in the data table from the current time minus one day (point values logged in the last 24 hours.)

The field entry is:

INSERT NTO MYTABLE VALUES NOW(), SELECT COUNT(*) FROM DATA_LOG

Where

DATA_LOG is the data log table.

Run program

Runs a selected program.

Configuration includes:

 

Check box

Checked enables Run program.

 

Field

Enter a program path name in the accompanying field.

The entry can  include command-line arguments for the program.

Example

Purge actions have been configured to save the records to a .csv file.

A program has been written that transfers the files to a zip drive.

The field entry is:

D:\Deleted\ Backupdeletedcsv.bat

Where

D:\Deleted\ is the path to the program.

Backupdeletedcsv.bat is the program that will be run when a maintenance event occurs.

Compact database

Compacts the Microsoft Access database where the table resides during a maintenance event.

 

Check box

Checked enables Compact database.

More information

image\Buttongraysm.png

Step 2. Configure CIMPLICITY point data logging properties.