Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Current Events
Join our developers event to win one of the valuable prizes!
posted 7 years ago
viewed 3360 times
Share this article

CUBRID Service Control

In this post, I will briefly introduce the CUBRID Service Control. Before we go on, let's remember the Architecture of CUBRID. It consists of the following components:

  1. Database server – Stores the data.
  2. Broker – A middleware that connects CUBRID with AP.
  3. CUBRID Manager Server – Program that manages CUBRID and the Broker.
Each of the elements introduced above is part of the CUBRID product family, and can run on its own. You can control each of these in the following way:

  1. Database server start/stop – cubrid server start <db_name>/cubrid server stop <db_name>
  2. Broker start/stop – cubrid broker start/cubrid broker stop
  3. CUBRID Manager Server start/stop – cubrid manager start/cubrid manager stop
However, it is rare for any of these to be run separately. CUBRID provides a command that will control the operation of the above parts at the same time. I will now show you some ways to set some parameters that enable the more convenient use of this command.

Currently, you can use the “cubrid service start” command to start CUBRID services at once.

So, where the “cubrid service start” command is set?

The answer is in cubrid.conf. When you open cubrid.conf, you will see the following items.

# Service section - a section for 'cubrid service' command


# The list of processes to be started automatically by 'cubrid service start' command

# Any combinations are available with server, broker and manager.


The part indicated in red above is the one to be controlled by the “cubrid service” command. Server is a Database, broker is a middleware, and Manager is a CUBRID Manager Server. If you want to put the CUBRID Manager server out of control of the “cubrid service” command, remove it from the above service items. To run each service separately, set each as a comment (#).

When you run the services with “cubrid service start,” you will notice that something is missing. This is because it appears that all services have been started, but when you try to connect to the DB, you will get the message that the DB which has been created is not running. You might say to yourself, “I thought everything would be done at once…" There is a solution to this problem. Open cubrid.conf again and look at the contents below. You will see the following items:

# The list of database servers in all by 'cubrid service start' command.

# This property is effective only when the above 'service' property contains 'server' keyword.



It is not difficult to find because this part is shown immediately below. Write the name of the newly created DB in the part indicated in red above. Of course, you should remove the comment (#). You can delete foo and bar because they are only samples. You can do the following to register demodb which is created by default during CUBRID installation.


Now, run the “cubrid service start” command. demodb will start as well. It will stop as well when you run the “cubrid service stop” command to stop the services. Now you can control CUBRID with a single command. If there are more DBs created, specify them in a row, separating them with commas (,).

comments powered by Disqus