This article provides steps to purge a large database in Ivanti Patch for Windows for maintenance purposes.
To purge the database of old data (clean up):
Using Database Maintenance tool built into Ivanti Patch for Windows:
- Launch Ivanti Patch for Windows.
- Navigate to Tools > Options > Database Maintenance (Tools > Operations > Database Maintenance in Protect)
- Change the Delete results older than (days) or max results to keep to the desired amount.Optional): Enable the 'Rebuild Indexes' options and the option to 'Backup database and transaction log'.
6. Wait approximately 15 minutes to allow time deletion of old results to take place. The operation runs as a background task and may take more or less time than this based on how many records are being deleted during the maintenance.
Alternate method of deleting results using Manage > Items
- In Ivanti Patch for Windows, go into Manage > Items from the menu.
- You can select specific results to delete, then click 'Delete selected', or you can click 'Delete All'. This needs to be repeated for each type of results that you want to delete from your database (Patch Scans, Patch Deployments, etc.).
- You will be prompted to confirm when you click a delete option.
- You will then see a progress bar showing the status of the deletion of results. If you have a large amount of results to be deteted, this can take some time to run.
Additional optional steps to be performed within SQL Management Studio:
- Launch the SQL Management Studio.
- Expand Databases.
- Right-click your ShavlikScans database and click Properties.
- Click Options.
- Change the Recovery Model from Full to Simple.
- Click OK.
- Right-click the IvantiScans database again and click Tasks.
- Click Shrink > Files.
- Change the File type to log.
- Under Shrink Action, click Reorganize pages before releasing unused space and set the Shrink file to field to 0.
- Click OK. This truncates the transaction log to 0 bytes.
- (Optional) Repeat Steps 8 through 10 and reset the Recovery model to Full.
- Right-click the ShavlikScans database again and click Tasks.
- Click Shrink > Database and click OK.
- Wait for the shrink operation to complete. In case of large databases, it may take a long time to complete.
If you are using SQL Express you may need to install the SQL Management Studio for express editions before you can perform the actions described above. The links for SQL Express Management Studio downloads can be found here.
Ivanti Patch for Windows Servers 9.3.x