Using the feature Cleanup Database it is possible to delete old shipments, contacts, error logs and shipment documents both manually and automatically.
- Read this before starting the cleanup process
- Manual cleanup of shipment data
- Automatic cleanup of shipment data
- Cleanup of other data
- Delete data in SQL Management Studio
Read this before starting the cleanup process
- We recommend making a backup before and after cleaning up old data.
- Set the Database recovery model to Simple if you are running SQL Express. Verify with your IT department before making any changes to the recovery model. Never make changes if you do not know the difference between the different recovery models. Read more about recovery models at Microsoft.
- Verify that you have enough disk space and delete a little data at a time. Running clean up requires disk space and the more data you clean up, the more disk space is required for the process to run. Cleaning up a large amount of data in one go can take a very long time.
- The clean-up process cannot be aborted once started.
- We recommend doing backup and cleanup outside of production hours.
Read more in this article: Making a backup of On-premises.
Manual cleanup of shipment data
- Go to File > Cleanup Database and choose the Shipments tab.
-
Cleanup Level indicates which location to clean up.
-
Shipments in Database indicates how much space can be released.
-
Days old indicates that all data older than the specified number of days should be deleted.
-
Shipment Source indicated the type of data to be deleted.
- Start the cleanup by clicking the Cleanup button.
- Click Yes, if data should be deleted.
- To make sure that no data is deleted by accident, the system will ask one more time. Click No to continue the cleanup or Yes to cancel.
Automatic cleanup of shipment data
- Click the arrow on the Cleanup button and choose Schedule.
- Specify the cleanup information as under manual cleanup.
- Create a job by clicking New and entering a name. Click OK to save.
- Click New to create a schedule and select Recurrent if the cleanup is to be repeated, or Run Once for a single run. You can also choose Interval which allows you to specify start and end time as well as interval in minutes.
- Enter weekdays and times.
- Click OK to save the schedule.
Cleanup of other data
From the Miscellaneous tab under Cleanup database, it is possible to delete old contacts, shipment documents, cleanup error logs, and shipping rules. It is primarily the shipping documents that occupy space. In general, we do not recommend deleting jobs and error logs as they may be useful in the event of debugging situations.
- Go to File > Cleanup Database and choose the Miscellaneous tab.
-
Cleanup Documents on Transmitted Shipments deletes all shipment documents on transmitted shipments. NOTE: The function does not delete the shipping history.
-
Cleanup trashed contacts deletes contacts.
-
Cleanup error logs deletes error logs in On-premises.
-
Cleanup jobs deletes the log of On-premises' actions
-
Cleanup Shipping Rules will delete the log of Shipping Rules if you are using this feature.
-
Cleanup Documents on Transmitted Shipments deletes all shipment documents on transmitted shipments. NOTE: The function does not delete the shipping history.
- Define the number of days for deletion next to the desired function and click CleanUp. You also have the option to set up an automatic cleanup by selecting Schedule and creating a schedule in the same way as during the automatic cleanup of shipping data.
Delete data in SQL Management Studio
We recommend that an IT expert do the following.
- Open SQL Management Studio and find the nShift / Consignor database.
- Create the following Query and specify the desired number of days. In the example below, data older than 730 days will be deleted:
USE [DATABASENAME]
exec spCleanupForInstallation 730 - Execute the query.
- The cleanup begins. This may take several minutes.