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 theConfigure Database Maintenancepermission.
To create an archive cleanup schedule
- OnTools, selectDatabase Management.
- OnDatabase Management, selectDatabase Maintenance.
- In theSchedule Archive/Log Cleanupsection, 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.
- Configure the schedule name and choose the email recipients to receive the results and summary.
- Select the files that will be cleaned up.
- 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.
- SelectNext.
- Set the deletion criteria.
- Configure the frequency for automatic database maintenance by selecting the start date, time, and weeks.
- Choose one of the following modes.
- Simple: all selected items have the same deletion criteria.
- 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.
- 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.
- 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. SelectDelete labeled versionsto clear the labeled versions.TIP:If the items you selected only have the labeled versions, you must selectDelete labeled versionsto proceed.Delete by dateworks the same as theSimplemode.
- Specify the range of dates for the file versions to be deleted.
- Configure how many versions to keep.
- Decide whether to apply recursively to children of this container asset by selecting or clearing the checkbox.
Delete by version:- Specify the version range of the file to be deleted.
- SelectNext.
- Determine what action to take.
- 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.
- 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 schedule is created, this setting 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 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.
- SelectFinish.
Provide Feedback