# Database Maintenance

Events such as controller configurations, libraries, tightening programs, device settings, results, etc. are automatically added to the previously saved events in the database. To clear the database in order to save space, and to make the system more efficient, the history data can be deleted, keeping only the latest results of all the events. Taking "snapshots" of the latest results of all the events can be scheduled in the Database Maintenance feature.

Archive data: Select yes to save (archive) the history data in the database. History data will be deleted after every snapshot if selecting no. Note that the results of the taken snapshots are saved regardless.

Only one instance of Database Maintenance task type can be defined at a time.

Schedule
Parameter | Description
--- | ---
Enabled | When set to Yes, the scheduled task will run according to the scheduled configurations. When set to No, the scheduled task will not run.
Weekdays | Mark one or more weekdays when the task will run.
Time | Select a run time from the drop-down menu.
Start date | Select a start date for the run time from the calender icon.
Select end date | When set to Yes, the scheduled task will run according to the schedule until the end date. When set to No, the scheduled task will run according to the schedule from the start date.

After a task is executed, the results are shown in the Results menu.

Results
Parameter | Description
--- | ---
Status | The scheduled task status after running the task can show OK or NOK.
Controller | Displayed if available for the task.
Latest run | Time and date when the scheduled task was executed.
Error | Error code examples if the status is NOK. ControllerNotOnline ControllerNotFound NoWriteAccessToStorage ExportFailed ImportFailed FileNotFound TimedOut