Skip to content

Flow documentation · legacy product

Shrinking a configuration database ​

Over time your Flow configuration database will grow in size and use up disk space.

The configuration itself normally takes up only a small amount of room, but a lot of temporary/log data is stored in the configuration database which can be cleaned out every so often. You should first delete this data and then shrink the database.

These SQL statements can be executed through the SQL Window or through Microsoft SQL Management Console

Clean out all temporary and log files

These SQL statements will clean out all temporary and log data (even the very latest logs). Use will caution and ensure you have first backed up the database with this data so you can restore to it if necessary.

truncate table flo_logs

truncate table flo_log_files

truncate table flo_log_fileevents

delete from flo_log_transportevents where complete='Y'

truncate table flo_securityaudit

Clean out old temporary and log files

These SQL statements will clean out old temporary and log data based on a provided date. Ensure you have first backed up the database with this data so you can restore to it if necessary.

delete from flo_logs where logdate<'yyyy-mm-dd'

delete from flo_log_files where logdate<'yyyy-mm-dd'

delete from flo_log_fileevents where logdate<'yyyy-mm-dd' or fileid not in (select moduleid from flo_log_files)

delete from flo_log_transportevents where logdate<'yyyy-mm-dd' and complete='Y'

delete from flo_securityaudit where changedate<'yyyy-mm-dd'

Note: Replace 'yyyy-mm-dd' with the desired date in that format

After deleting the temporary and log data you can shrink the database. This reduces the amount of free space in the database and releases that space back to the operating system (so it can be used by other programs)

DBCC SHRINKDATABASE (<databasename>,0)

Note: Replace <databasename> with the name of your database as it appears in the Microsoft SQL Management Console menu.