Diagnostics: checkdb, diagdb, paramdump
checkdb
Section titled “checkdb”The coradb checkdb utility is used to check the consistency of a database. You can use coradb checkdb to identify data structures that are different from indexes by checking the internal physical consistency of the data and log volumes. If the coradb checkdb utility reveals any inconsistencies, you must try automatic repair by using the --repair option.
coradb checkdb [options] database_name [table_name1 table_name2 ...]- coradb: An integrated utility for CoraDB service and database management.
- checkdb: A utility that checks the data consistency of a specific database.
- database_name: The name of the database whose consistency status will be either checked or restored.
- table_name1 table_name2: List the table names for consistency check or recovery
The following shows [options] available with the coradb checkdb utility.
This 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.
coradb checkdb -S testdbThis 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.
coradb checkdb -C testdbThis option is used to restore an issue if a consistency error occurs in a database.
coradb checkdb -r testdbThis option is used to check if there are errors on previous links of an index.
$ coradb checkdb --check-prev-link testdbThis option is used to restore if there are errors on previous links of an index.
$ coradb checkdb --repair-prev-link testdbYou can specify tables to check the consistency or to restore, by specifying the -i FILE option or listing the table names after a database name. Both ways can be used together. If a target is not specified, entire database will be a target of consistency check or restoration.
coradb checkdb testdb tbl1 tbl2coradb checkdb -r testdb tbl1 tbl2coradb checkdb -r -i table_list.txt testdb tbl1 tbl2Empty string, tab, carriage return and comma are separators among table names in the table list file specified by -i option. The following example shows the table list file; from t1 to t10, it is recognized as a table for consistency check or restoration.
t1 t2 t3,t4 t5t6, t7 t8 t9
t10Check about all pages of all files in file-trackers.
Check about all heap-files.
Check the consistency about catalog information.
Check the validity about all B-tree indexes.
Check the identical between the hash table of a class name and the class information(oid) brought from a heap file.
Check the consistency of all B-tree entries.
Checks the graph data of vertex and edge tables: the in-memory graph, the graph data on disk, and that both are in sync. The three checks can also be run one at a time:
| Option | Checks |
|---|---|
| --check-graph-in-memory | The consistency of the in-memory graph |
| --check-graph-disk | The consistency of the graph data on disk |
| --check-graph-sync-disk-mem | That the in-memory graph matches the data on disk |
The intensity of the graph checks, 1 or 2; the default is the highest level.
Check if the index specified with this option about checking table. If you use this option, there is no heap validation check. Only one table and one index are permitted when you use this option; if you don't input a table name or input two tables, an error occurs.
diagdb
Section titled “diagdb”You can check various pieces of internal information on the database with the coradb diagdb utility. Information provided by coradb diagdb is helpful in diagnosing the current status of the database or figuring out a problem.
coradb diagdb options database_name- coradb: An integrated utility for the CoraDB service and database management.
- diagdb: A command that is used to check the current storage state of the database by Dumping the information contained in the binary file managed by CoraDB in text format. It normally executes only when the database is in a stopped state. You can check the whole database or the file table, file size, heap size, class name or disk bitmap selectively by using the provided option.
- database_name: The name of the database whose internal information is to be diagnosed.
The following shows [options] available with the coradb diagdb utility.
This option specifies the output range when you display the information of all files in the testdb database. If any option is not specified, the default value of -1 is used.
coradb diagdb -d 1 testdbThe utility has 9 types of -d options as follows:
| Type | Description |
| -1 | Displays all database information. |
| 1 | Displays file table information. |
| 2 | Displays file capacity information. |
| 3 | Displays heap capacity information. |
| 4 | Displays index capacity information. |
| 5 | Displays class name information. |
| 6 | Displays disk bitmap information. |
| 7 | Displays catalog information. |
| 8 | Displays log information. |
| 9 | Displays heap information. |
The -o option is used to store information of the parameters used in the server/client process of the database into a specified file. The file is created in the current directory. If the -o option is not specified, the message is displayed on a console screen.
coradb diagdb -d8 -o logdump_output testdbUse --emergency option to suppress recovery. This option is meant ONLY for debugging, if there are recovery issues. It is recommended to backup your database before using this option.
paramdump
Section titled “paramdump”The coradb paramdump utility outputs parameter information used in the server/client process.
coradb paramdump [options] database_name- coradb: An integrated utility for the CoraDB service and database management
- paramdump: A utility that outputs parameter information used in the server/client process
- database_name: The name of the database in which parameter information is to be displayed.
The following shows [options] available with the coradb paramdump utility.
The -o option is used to store information of the parameters used in the server/client process of the database into a specified file. The file is created in the current directory. If the -o option is not specified, the message is displayed on a console screen.
coradb paramdump -o db_output testdbThe -b option is used to display parameter information used in server/client process on a console screen. If the -b option is not specified, only server-side information is displayed.
coradb paramdump -b testdbThis option displays parameter information of the server process in standalone mode.
coradb paramdump -S testdbThis option displays parameter information of the server process in client/server mode.
coradb paramdump -C testdb