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 the
    Configure Database Maintenance
    permission.
To create a log cleanup schedule
  1. On
    Tools
    , select
    Database Management
    .
  2. On
    Database Management
    , select
    Database Maintenance
    .
  3. In the
    Schedule Archive/Log Cleanup
    section, select
    + New log cleanup schedule
    .
  4. In the
    New log cleanup schedule
    dialog:
    1. Enter the name of the schedule.
    2. Under the
      Email notification
      box, select the browse button, and then choose the email recipients to receive the results and summary. Select
      Submit
      .
    3. Select the type of the log to process, including the
      Event Log
      ,
      Audit Log
      , and
      Diagnostics & Health Log
      .
    4. In the
      Start on
      list, 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).
    5. In the
      weeks
      list, select the up and down arrow or enter an integer as the frequency for automatic database maintenance.
    6. In the
      Log data criteria
      section, select the up and down arrow or enter an integer to set the criteria for when to start exporting and deleting the data.
    7. (optional) Select the
      Export data to file
      check 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.
    8. Decide whether to run the schedule automatically or manually. If you select
      Activate the schedule
      , the task will run at its next scheduled time automatically or run immediately upon selecting log cleanup schedule start. If you clear
      Activate the schedule
      , the task will run immediately upon selecting log cleanup schedule start.
      TIP:
      After the creation, the status can be changed by editing the schedule or switching the toggle in the schedule archive cleanup section.
    9. (optional) Select
      Shrink the database
      to 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.
  5. Select
    OK
    .
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal