Database Housekeeping

By Pedro Matias on 9 Mar 2012
After some years of development, the OutSystems database that supports a DEV environment have a lot of unused tables, attributes, system data, and also the process to remove  the unused espaces doesn't shrink the CLOB's data (ORACLE) and neither remove the spaces that are producers to another unused espaces.

Regarding the CLOB's, it's necessary to execute a manual process to shrink the tablespace.
To maintain the database healthy and tuned, I think that a processes to housekeeping the database will be a nice to have on OutSystems Platform.

Pedro Matias
Goncalo Borrega27 Apr 2015
The new DbCleaner API was designed for this purpose. Check the documentation to understand the required privileges when using it.
As a lot of you mentioned, this is a very sensitive operation that we must ensure is only performed by the right person and under the right conditions. Therefore we will not make it available from the Studio.

This component at the Forge shows a small example of how to use the API. You can use it to adapt to your own security restrictions and policies.

Regarding shrinking and other database maintenance tasks, we'll leave that for your DBA's defined maintenance plans, or, in the cloud, do it automatically for you!