Create a log cleanup schedule
Create a log cleanup schedule to manage the size of the audit logs, event logs, and diagnostics and health logs in FactoryTalk AssetCentre.
Through the course of normal operation, the Audit and Event logs of the FactoryTalk AssetCentre system can grow quite large. As a direct consequence, the Microsoft SQL database size will also expand. Due to these considerations, it is possible for an administrator of the system to remove older log messages.
To do this, identify a group of logs (Event, Audit, or Diagnostics and Health) to remove from the system's database, and then specify the days prior to the scheduled date that those log files should be removed. For example, entering a day of 1 will remove all log files one day prior to your scheduled date.
IMPORTANT:
When a log or archive cleanup task is running, some user or system requests may be paused
because Microsoft SQL Server may lock tables to delete data. If a database shrink task
follows, it may take even longer. While the requested operations will resume once the tables
are unlocked, the waiting time depends on the amount of data being processed, and unexpected
issues may occur. We recommend not using the FactoryTalk AssetCentre system during log or
archive cleanup tasks.
Prerequisites
- Make sure you have theConfigure Database Maintenancepermission.
To create a log cleanup schedule
- OnTools, selectDatabase Management.
- OnDatabase Management, selectDatabase Maintenance.
- In theSchedule Archive/Log Cleanupsection, select+ New log cleanup schedule.
- In theNew log cleanup scheduledialog:
- Enter the name of the schedule.
- Under theEmail notificationbox, select the browse button, and then choose the email recipients to receive the results and summary. SelectSubmit.
- Select the type of the log to process, including theEvent Log,Audit Log, andDiagnostics & Health Log.
- In theStart onlist, select a date, and then enter a time when the automatic database maintenance starts. Make sure the time format follows hh:mm AM (or PM).
- In theweekslist, select the up and down arrow or enter an integer as the frequency for automatic database maintenance.
- In theLog data criteriasection, select the up and down arrow or enter an integer to set the criteria for when to start exporting and deleting the data.
- (optional) Select theExport data to filecheck box to export your data. By default, the file is saved in < FactoryTalk AssetCentre server computer name>\C:\ProgramData\Rockwell\AssetCentre\Database Maintenance\Export\YYYYMMDD-< FactoryTalk AssetCentre server computer name>-logtype.mdf.IMPORTANT:The exported data files will be stored on the FactoryTalk AssetCentre server computer. Each file can be up to 10 GB in size, and multiple files may be generated during a single log cleanup schedule. To maintain optimal system performance, the server requires at least 16 GB of free disk space in addition to the space needed for exported files. For example, if one exported file is 10 GB, a minimum of 26 GB of available disk space should be preserved. To help prevent schedule execution failures due to insufficient disk space, we recommend that you regularly move these files to other places.
- Decide whether to run the schedule automatically or manually. If you selectActivate the schedule, the task will run at its next scheduled time automatically or run immediately upon selecting
. If you clear Activate the schedule, the task will run immediately upon selecting
. TIP:After the creation, the status can be changed by editing the schedule or switching the toggle in the schedule archive cleanup section. - (optional) SelectShrink the databaseto perform a database shrink after the log cleanup task is completed. In the percentage list, enter any integer from 30 to 70. A database shrink will be initiated after the log cleanup task if the available free space exceeds the configured threshold. Shrinking the database may be followed by an automatic index rebuild. Both operations could take a long time, affect database performance, and cannot be stopped once initiated.
- SelectOK.
Provide Feedback