ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.
How to reclaim space from the Harvest database
Article ID: 199803
CA Harvest Software Change ManagerCA Harvest Software Change Manager - OpenMake Meister
We are cleaning up and removing some files from Harvest which should be giving back some space (in theory), but the DB is not showing any relief and in fact is growing in size. Would this be normal or is there a way to reclaim the space?
Release : 13.0.3
Component : CA Harvest Software Change Manager
For both types of databases, just deleting data from the database won’t shrink the size of the database’s data files.
For Oracle here’s an article that explains how to shrink the size of the data files: https://oracle-base.com/articles/misc/reclaiming-unused-space
For SQL Server you can do it from Management Studio. Expand the tree view, right click on the database, go to Tasks and Shrink, and you should be able to shrink the data file from there.
Another thing to know is that promoting a package doesn’t create duplicate copies of versions of files in the next state. Each version of each file is only stored once and pointers are used to associate that version with the various packages and states and snapshots. So, promoting a package shouldn’t by itself explode the size of your database.
However, checking in multiple versions of very huge files would do it. It might be worth reviewing how much of it is necessary. Here’s an example. If you check in all the files in a folder structure, then collect all those files in a zip file or jar file, and check in the zip or jar, that could add extra data in your database that might not be necessary. If you’ve got all the files, checking in the jar or zip is redundant. If you then change only one file, then create a new zip or jar and check that in, you’ve added another redundant layer. Taking a snapshot in Harvest at the same time that you create the zip or jar file would be a more efficient way to do it.
Something you might consider is setting up an archive Harvest database on a different drive or computer, and using hmvproj to move some of your inactive projects to the archive database. You can then use the same tool to delete those projects and all associated versions, then last step would be to shrink the database using one of the methods above, depending on if it’s Oracle or SQL Server.