Compacting Used Space

Description

The cubrid compactdb utility is used to secure unused space of the database volume. In case the database server is not running (offline), you can perform the job in stand-alone mode. In case the database server is running, you can perform it in client-server mode.

The cubrid compactdb utility secures the space being taken by OIDs of deleted objects and by class changes. When an object is deleted, the space taken by its OID is not immediately freed because there might be other objects that refer to the deleted one. Reference to the object deleted during compacting is displayed as NULL, which means this can be reused by OIDs.

Syntax

cubrid compactdb options database_name [class_name], class_name2,...]

options : [-v | --verbose] [-S|--SA-mode | -C| --CS-mode]

Options

Displaying  detailed messages during execution (-v)

You can output messages that shows which class is currently being compacted and how many instances have been processed for the class by using the -v option.

cubrid compactdb -v testdb

Executing in stand-alone mode (-S or --SA mode)

The -S option is specified to compact used space in stand-alone mode while database server is not running; no arugment is specified.  If the -S option is not specified, system recognizes that the job is executed in client/server mode.

cubrid compactdb --SA-mode testdb

Executing in client/server mode (C or --CS mode)

The -C option is specified to compact used space in client/server mode while database server is running; no argument is specified. Even though this option is omitted, system recognizes that the job is executed in client/server mode. The following options can be used in client/server mode only.