CLEANUP_UNUSED_FILES Command
The CLEANUP_UNUSED_FILES command scans recursively all CBM locations in the database to find files that do not belong to any table. Use this command to manually cleanup any unused files that exist in the system.
This command can be executed on a working system. You should remove the unused files only after ensuring that the system is running correctly.
This command has the following format:
CALL X100(CLEANUP_UNUSED_FILES ['''<mode>'''])
where:
mode
An optional argument that allows you to perform one of the following actions on unused files:
• Rename - Moves unused files to the backup directory with a timestamp of cleanup invocation. This is the default option if no argument is provided.
• Delete_empty - Deletes a file only if it is empty (0 bytes)
• Delete - Deletes the unused files
Note: CLEANUP_UNUSED_FILES is designed to be used in cases where files are not deleted due to a crash or bug. It does not mark unreleased files that may still be needed by a transaction. So using this system call may not help you to free space if there are long-running or hanging transactions in the system.
Last modified date: 12/19/2024