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?
Harvest Software Change Manager v13.0.3 and up
For both types of databases (Oracle and SQL Server), 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: ORACLE-BASE: Reclaiming Unused Space in Datafiles
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, 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 the types of very large files you are checking in and whether it is necessary for Harvest to control the versions of these files. 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, 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 the "hmvproj" utility 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. The last step would be to shrink the database using one of the methods above, depending on if it’s Oracle or SQL Server.
Beginning with Harvest v14.5 there is a new "HShrink" utility that can help to shrink the size of the Harvest database. You can read more here: New Features and Enhancements - Optimise Harvest Tablespace using HShrink Utility
More information about hmvproj can be found here: Copy or Move a Project from One Database to Other