Versions available for this page: CUBRID 8.2.1 | CUBRID 8.3.0 | CUBRID 8.3.1 | CUBRID 8.4.0 | CUBRID 8.4.1 | CUBRID 8.4.3 | CUBRID 9.0.0 |
The cubrid checkdb utility is used to check the consistency of a database. You can use cubrid checkdb to identify data structures that are different from indexes by checking the internal physical consistency of the data and log volumes. If the cubrid checkdb utility reveals any inconsistencies, you must try automatic repair by using the --repair option.
cubrid checkdb options database_name [class_name1 class_name2 ...]
options : [-S|--SA-mode | -C|--CS-mode] [-r | --repair] | [-i table_list.txt|--input-class-file]
Checking the database consistency 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 checkdb -S testdb
Checking the database consistency 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 checkdb -C testdb
Repairing in case of a database consistency problem (-r or --repair)
The -r option is used to repair an issue if a consistency error occurs in a database.
cubrid checkdb -r testdb
Limit to the tables specifying the target for consistency check or recovery of database (-i, --input-class-file or tables)
You can limit the target for consistency check or recovery as in the table list file after -i table_list.txt option or the tables specified after the database name. They can be used together and if the target is not specified, full database consistency check or recovery will be executed.
cubrid checkdb testdb tbl1 tbl2
cubrid checkdb -r testdb tbl1 tbl2
cubrid checkdb -r -i tbl_list.txt testdb tbl1 tbl2
Empty string, tab, carriage return and comma are separators among table names in the table list file specified by -i option. The following is an example of a table list file and recognizes all from t1 to t10 as tables for consistency check or recovery.
t1 t2 t3,t4 t5
t6, t7 t8 t9
t10