Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

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

cubrid changemode

Description

This utility is used to check and change the server status of CUBRID HA.

Syntax

cubrid changemode [option] <database-name>

  • database-name: Specifies the name of a server to be checked or changed and separates each node name by using @.
Options

Option

Default

Description

-m

none

Changes the server status. You can enter one of the followings: standby, maintenance, or active.

-f

 

Configures whether or not to forcibly change the server status. This option must be configured if you want to change the server status from to-be-active to active. If it is not configured, the status will not be changed to active.

Forcibly change may cause data inconsistency among replication nodes; so it is not recommended.

-t

5 (in seconds)

Configures the waiting time for the normal completion of the transaction that is being processed when the node status switches from standby to maintenance. If the transaction is still in progress beyond the configured time, it will be forced to terminate and switch to maintenance status; if all transactions have completed normally within the configured time, it will switch to maintenance status immediately.

Status Changeable

This table shows changeable modes depending on current status.

 

Changeable

active

standby

maintenance

Current Status

standby

X

O

O

to-be-standby

X

X

X

active

O

X

X

to-be-active

O*

X

X

maintenance

X

O

O

* When the server status is to-be-active, forcibly change may cause data inconsistency among replication nodes. It is not recommended if you are not skilled enough.

Example

The following example shows how to switch the testdb server status in the localhost node to maintenance. The waiting time for all transactions in progress to complete normally is 5 seconds, which is the default value for the -t option. If all transactions are complete within this time limit, the status will be switched immediately. However, if there are transactions still being processed after this time limit, they will be rolled back before changing the status.

$ cubrid changemode -m maintenance testdb@localhost

The server 'testdb@localhost''s current HA running mode is maintenance.

The following example shows how to retrieve status of the testdb server in the localhost node.

$ cubrid changemode testdb@localhost

The server 'testdb@localhost''s current HA running mode is active.