Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 

Checking Used Space


The cubrid spacedb utility is used to check how much space of database volumes is being used. It shows a brief description of all permanent data volumes in the database. Information returned by the cubrid spacedb utility includes the ID, name, purpose and total/free space of each volume. You can also check the total number of volumes and used/unused database pages.


cubrid spacedb options database_name

options: [{-o|--output-file=}file] [-S|--SA-mode|-C|--CS-mode] [--size-unit=PAGE|M|G|T|H] [-s|--summarize]

  • cubrid: An integrated utility for the CUBRID service and database management.
  • spacedb: A command that checks the space in the database. It executes successfully only when the database is in a stopped state.
  • options: The -o, -S, -C --size-unit, and -s options are supported. For details about each option, refer to its description and the examples.
  • database_name: The name of the database whose space is to be checked. The path-name to the directory where the database is to be created must not be included.

Storing output messages to a file (-o)

The following syntax shows how to store the result of checking the space information of testdb to a file named db_output.

cubrid spacedb -o db_output testdb

Executing in standalone mode (-S or --SA-mode)

The -S option is used to access a database in standalone, which means it works without processing server; it does not have an argument. If -S is not specified, the system recognizes that a database is running in client/server mode.

cubrid spacedb --SA-mode testdb

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

The -C option is used to access a database in client/server mode, which means it works in client/server process respectively; it does not have an argument. If -C is not specified, the system recognize that a database is running in client/server mode by default.

cubrid spacedb --CS-mode testdb

Outputing in specified size unit (--size-unit)

The --size-unit option is used to specify the size unit of the space information of the database to be one of PAGE, M(MB), G(GB), T(TB), H(print-friendly). The default value is H. If you set the value to H, the unit is automatically determined as follows: M if 1 MB = DB size < 1024 MB, G if 1 GB = DB size < 1024 GB.

cubrid spacedb --size_unit=M testdb

cubrid spacedb --size_unit=H testdb

Outputs total pages, used pages, free pages by volume usage (-s or --summarize)

Aggregates total_pages, used_pages and free_pages by DATA, INDEX, GENERIC, TEMP and TEMP TEMP, and outputs it.

cubrid spacedb –s testdb