Versions available for this page: CUBRID 8.2.1 | CUBRID 8.3.0 | CUBRID 8.3.1 |
CUBRID utilities used for the HA feature are as follows. The following utilities can be used only in servers where the ha_mode parameter is configured to on.
The syntax for the cubrid changemode utility, which is used to output or change the state of the database server, is as follows. The history of the server error log is output every time the operation mode of the server changes. The current operation mode is output if the -m option is not specified.
cubrid changemode [option] <database_name>@<hostname>
option:
-m, --mode=<MODE> : Specifies the mode to change. Available values are active, standby and maintenance.
[ha_user1@server_s1 ~]$ cubrid changemode tdb01@server_s1
The server 'tdb01@server_s1''s current HA running mode is active.
[ha_user1@server_s1 ~]$ cubrid changemode tdb01@server_s2
The server 'tdb01@server_s2''s current HA running mode is standby.
You can check the HA mode of database currently connected by entering ;database command in the CSQL session.
csql> ;database
demodb@localhost (active)
The syntax for the cubrid copylogdb utility, which is used to copy the transaction log created by the remote database server to a specified path, is as follows:
There are three ways of sending the transaction log as follows: You should choose one that meets your operation policy.
cubrid copylogdb [option] <database_name>@<hostname>
option:
-L, --log-path=<PATH>: A file path to which the copied transaction log is to be stored.
-m, --mode=<MODE>: Specifies the method by which the transaction log page is to be copied. The one of following options are available: sync, semisync, async. Guaranteeing sending and writing logs jobs is determined by selected mode.
The syntax for the cubrid applylogdb utility, which reads the copied transaction log file from the specified path, analyzes it, and then reflects it to the local database server, is as follows:
cubrid applylogdb [option] <database_name>@<hostname>
option:
-L, --log-path=<PATH> : The path to the transaction log file to be read.
--max-mem-size=<SIZE> : The maximum memory size available for process. The memory unit is MB; up to 1,000 MB is allowed.
Note The restart condition of the applylogdb process can be configured with the --max-mem-size option. For information about configuring the restart condition of the CAS process according to current memory usage, see the APPL_SERVER_MAX_SIZE parameter in Parameter by Broker. The applylogdb process restarts when the current memory size reaches the size specified in the --max-mem-size, or reaches twice the size of the memory at the start of the process, whichever is larger.