· Feb 28, 2019

Ensemble 2013 - Compact/Truncate

Good afternoon,

We have a very old version of Ensemble with one of our clients and they have no desire to upgrade anytime soon. We have gotten the all-clear to purge really old messages from the database, changing the days kept from 60 to 30. The option to Compact/Truncate is displayed in this version of Ensemble, but does not execute as it mentions not being actually present in this version.

There is an option in ^d DATABASE that restores unused space, however this does not return nearly as much free space as the refined Compact/Truncate procedure.

My question is: Is it possible to Compact/Truncate properly in Ensemble 2013?

Many thanks and kind regards, Alexi Demetriou

Discussion (2)1
Log in or sign up to continue

With that version of Ensemble, the compact / truncate sequence could cause database corruption, so it was disabled. It's still possible to shrink the database, but it will require downtime (if the database needs to run 24x7, you'll have to plan for this) and you'll need enough hard drive space to house the current "large" version of the database and the compacted version.

You'll need to create a new empty database, then in a terminal prompt go into the %SYS namespace and do a GBLOCKCOPY:




Choose Option 1 (Interactive Copy), then option 1 (Copy from Database to Database), choose the original directory, then the new directory. (Note where these directories are -- you'll need that later.) It will then ask you if you want to copy all the globals, and choose Yes. You may get a prompt about a global having no data, if you get that choose "yes" to include it anyway.

Once the database has been copied, shut down Ensemble and move the CACHE.DAT file out of the original file (I would recommend copying it to an external hard drive or somesuch -- you can't have too many backups!) then copy the now smaller CACHE.DAT from the destination directory into the original. Restart Ensemble and verify that your data and applications work as advertised, then you can delete the destination database through Ensemble.

Hope this helps!

Good afternoon Roger,

Thank you so much for your time writing this! I will see if I can liaise a time to perform this as it will be on the Live production. Will I also need to shut down the mirror instance too? I would imagine so as it will still lock the Cache.dat file.

I had no idea that the Compact/Truncate option would cause such problems on that version, and it certainly explains why it refuses to run.

Many thanks and kind regards, Alexi Demetriou