Create an archive cleanup schedule

As you use the FactoryTalk AssetCentre Archive, you will accumulate versions of files that are no longer useful. Accumulated files can hamper the performance of the Archive. You can create an archive cleanup schedule to remove unnecessary versions of archived files from the database, thereby clearing space. Removed versions are deleted from the database, but the version number and associated notes can be retained in the archive for record keeping.
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 that you have the
    Configure Database Maintenance
    permission.
To create an archive 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 archive cleanup schedule
    .
    TIP:
    It is recommended to back up the FactoryTalk AssetCentre SQL Server database before cleaning up the archive. To ensure that all archive files are trimmed, files should be checked back into the FactoryTalk AssetCentre system.
  4. Configure the schedule name and choose the email recipients to receive the results and summary.
  5. Select the files that will be cleaned up.
    1. From the current assets list, select the items or containers with file versions that you want to delete. If the assets you selected are deleted from the tree or readded with the same names after you create this schedule, the task of cleaning up the associated file versions will fail. However, this will not affect the scheduled task. You can refer to the event logs for details and then remove invalid assets by editing the schedule.
    2. Select
      Next
      .
  6. Set the deletion criteria.
    1. Configure the frequency for automatic database maintenance by selecting the start date, time, and weeks.
    2. Choose one of the following modes.
      • Simple
        : all selected items have the same deletion criteria.
        1. Specify the range of dates for the file versions to be deleted.
          TIP:
          When you enter the range of dates, the system calculates the initial period based on your computer's current time, which shows below your date range. For example, if the current date is March 18, and you specify a range from 2 through 5 or 5 through 2, the system will initially consider file versions between March 13 and March 16. However, due to the calculation method, only file versions on March 14, March 15, and March 16 will be deleted, the file versions on March 13 are kept. If you enter the same number, for example, from 10 through 10, no file versions will be deleted. For each subsequent schedule, the system recalculates the date range based on the actual time of your computer.
        2. Configure how many versions to keep.
          TIP:
          The system decides which file versions to keep according to the time order. Therefore, some versions within your deletion time range will still be kept if the latest versions are fewer than your specified version numbers. For example, if the range of dates for the file versions to be deleted is between 10 to 30 days and five versions are set to keep, the system will try to keep the latest five versions (the first and last versions will always be kept). If the latest versions are fewer than five, some versions within these 10 to 30 days will still be kept.
        3. Decide whether to apply recursively to children of this container asset by selecting or clearing the checkbox.
      • Advanced
        : each item can have different deletion criteria.
        Select the items and then specify whether to delete its file versions by date or version number. Select
        Delete labeled versions
        to clear the labeled versions.
        TIP:
        If the items you selected only have the labeled versions, you must select
        Delete labeled versions
        to proceed.
        Delete by date
        works the same as the
        Simple
        mode.
        1. Specify the range of dates for the file versions to be deleted.
        2. Configure how many versions to keep.
        3. Decide whether to apply recursively to children of this container asset by selecting or clearing the checkbox.
        Delete by version
        :
        1. Specify the version range of the file to be deleted.
    3. Select
      Next
      .
  7. Determine what action to take.
    1. Select one of these modes:
      • Do not delete the comments contents
        - all comments will remain in the SQL Server table.
      • Delete the comments contents and export them to an MDF (SQL Server database) file
        - all comments will be removed from the SQL Server table but saved in a specified folder.
      • Delete the comments contents
        - all comments will be removed from the SQL Server table.
    2. 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 archive cleanup schedule start. If you clear
      Activate the schedule
      , the task will run immediately upon selecting archive cleanup schedule start.
      TIP:
      After the schedule is created, this setting can be changed by editing the schedule, or switching the toggle in the schedule archive cleanup section.
    3. (optional) Select
      Shrink the database
      to perform a database shrink after the archive cleanup task is completed. In the percentage list, enter any integer from 30 to 70. A database shrink will be initiated after the archive 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.
    4. Select
      Finish
      .
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal