:meta-keywords: coradb server process, cora_server, coradb broker, coradb cas, coradb manager server, coradb HA, coradb services, coradb logging, coradb errors, coradb server access, coradb status, coradb manager, coradb javasp, cora_javasp :meta-description: How to control and check CoraDB services and processes (server, broker), logging files, access, errors, CoraDB Manager and CoraDB Java SP Server. .. _control-coradb-processes: Controlling CoraDB Processes ============================ CoraDB processes can be controlled by **coradb** utility. Controlling CoraDB Service -------------------------- The following **coradb** utility syntax shows how to control services registered in the configuration file. One of the following can be specified in . :: coradb service : {start|stop|restart|status} * start: start services. * stop: stop services. * restart: restart services. * status: check status. No additional options or arguments are required. Controlling Database Server --------------------------- The following **coradb** utility syntax shows how to control database server process. :: coradb server [database_name] : {start|stop|restart|status} One of the following can be specified in : * start: start a database server process. * stop: stop a database server process. * restart: restart a database server process. * status: check status of a database server process. | Every command can specify a database name (**[database_name]**) as an argument. | If the database name is not specified, the **status** command displays the currently running database servers' information, and the commands except **status** refer to the database names in the **server** property of the **[service]** section of **coradb.conf**. :: # coradb.conf [service] ... server=demodb,testdb ... :: % coradb server start @ coradb server start: demodb This may take a long time depending on the amount of recovery works to do. CoraDB 1.0 ++ coradb server start: success @ coradb server start: testdb This may take a long time depending on the amount of recovery works to do. CoraDB 1.0 ++ coradb server start: success Controlling Broker ------------------ The following **coradb** utility syntax shows how to control CoraDB broker process. :: coradb broker : start |stop |restart |status [options] [broker_name_expr] |acl {status|reload} broker_name |on |off |reset broker_name |info * start: start broker processes. * stop: stop broker processes. * restart: restart broker processes. * status: check status of broker processes. * acl: limit broker access. * on/off: enable/disable the specified broker. * reset: reset the connection to broker. * info: display the broker configuration information. Controlling CoraDB Manager Server --------------------------------- To use the CoraDB Manager, the Manager server must be running where database server is running. The following **coradb** utility syntax shows how to control the CoraDB Manager processes. :: coradb manager : {start|stop|status} * start: start manager server processes. * stop: stop manager server processes. * status: check the status of manager processes. Controlling CoraDB HA --------------------- The following **coradb heartbeat** utility syntax shows how to use CoraDB HA. One of the following can be specified in *command*. :: coradb heartbeat : {start|stop|copylogdb|applylogdb|reload|status} * start: start HA-related processes. * stop: stop HA-related processes. * copylogdb: start or stop copylogdb process. * applylogdb: start or stop applylogdb process. * reload: reload information on HA configuration. * status: check HA status. For details, see :ref:`coradb-heartbeat`. Controlling CoraDB Java Stored Procedure Server ------------------------------------------------ The following **coradb** utility syntax shows how to control CoraDB Java Stored Procedure server process. :: coradb javasp [database_name] : {start|stop|restart|status} One of the following can be specified in : * start: start a Java Stored Procedure server process. * stop: stop a Java Stored Procedure server process. * restart: restart a Java Stored Procedure server process. * status: check status of a Java Stored Procedure server process. Every command can specify a database name (**[database_name]**) as an argument. If the database name is not specified, the command is executed by referring to the database names in the **server** property of the **[service]** section of **coradb.conf**. :: # coradb.conf [service] ... server=demodb,testdb ... :: % coradb javasp start @ coradb javasp start: demodb ++ coradb javasp start: success @ coradb javasp start: testdb ++ coradb javasp start: success .. _control-coradb-services: CoraDB Services =============== Registering Services -------------------- You can register database servers, CoraDB brokers, CoraDB Java Stored Procedure servers, CoraDB Manager(s) or CoraDB HA as CoraDB service in the configuration file ( **coradb.conf** ). To register services, you can input for each **server**, **broker**, **javasp**, **manager** or **heartbeat** as a parameter value, and it is possible to input several values by concatenating them in comma(,). If you do not register any service, only master process is registered by default. It is convenient for you to view status of all related processes at a glance or start and stop the processes at once with the **coradb** **service** utility once it is registered as CoraDB service. - For details on CoraDB HA configuration, see :ref:`coradb-service-util`. - For details on CoraDB Java Stored Procedure server configuration, see :ref:`coradb-javasp-server-config`. The following example shows how to register database server and broker as service in the **coradb.conf** file and enable databases ( *demodb* and *testdb* ) to start automatically at once when CoraDB server starts running. :: # coradb.conf ... [service] # The list of processes to be started automatically by 'coradb service start' command # Any combinations are available with server, broker, manager, javasp and heartbeat. service=server,broker # The list of database servers in all by 'coradb service start' command. # This property is effective only when the above 'service' property contains 'server' or 'javasp' keyword. server=demodb,testdb Starting Services ----------------- In Linux environment, you can enter the code below to start CoraDB after installation. If no server is registered in the configuration file, only master process (cora_master) runs by default. In the Windows environment, the code below is normally executed only if a user with system permission has logged in. An administrator or general user can start or stop the CoraDB server by clicking its icon on the taskbar tray. :: % coradb service start @ coradb master start ++ coradb master start: success The following message is returned if master process is already running. :: % coradb service start @ coradb master start ++ coradb master is running. The following message is returned if master process fails to run. The example shows that service fails to start due to conflicts of the **coradb_port_id** parameter value specified in the coradb.conf file. In such a case, you can resolve the problem by changing the port. If it fails to start even though no port is occupied by process, delete /tmp/CoraDB1523 file and then restart the process. :: % coradb service start @ coradb master start cora_master: '/tmp/CoraDB1523' file for UNIX domain socket exist.... Operation not permitted ++ coradb master start: fail After registering service as explained in :ref:`control-coradb-services`, enter the code below to start the service. You can verify that database server process and broker as well as registered *demodb* and *testdb* are starting at once. :: % coradb service start @ coradb master start ++ coradb master start: success @ coradb server start: demodb This may take a long time depending on the amount of restore works to do. CoraDB 1.0 ++ coradb server start: success @ coradb server start: testdb This may take a long time depending on the amount of recovery works to do. CoraDB 1.0 ++ coradb server start: success @ coradb broker start ++ coradb broker start: success Stopping Services ----------------- Enter code below to stop CoraDB service. If no services are registered by a user, only master process stops and then restarts. :: % coradb service stop @ coradb master stop ++ coradb master stop: success Enter code below to stop registered CoraDB service. You can verify that server process, broker process, and master process as well as *demodb* and *testdb* stop at once. :: % coradb service stop @ coradb server stop: demodb Server demodb notified of shutdown. This may take several minutes. Please wait. ++ coradb server stop: success @ coradb server stop: testdb Server testdb notified of shutdown. This may take several minutes. Please wait. ++ coradb server stop: success @ coradb broker stop ++ coradb broker stop: success @ coradb master stop ++ coradb master stop: success Restarting Services ------------------- Enter code below to restart CoraDB service. If no services are registered by a user, only master process stops and then restarts. :: % coradb service restart @ coradb master stop ++ coradb master stop: success @ coradb master start ++ coradb master start: success Enter code below to restart registered CoraDB service. You can verify that server process, broker process, and master process as well as *demodb* and *testdb* stop and then restart at once. :: % coradb service restart @ coradb server stop: demodb Server demodb notified of shutdown. This may take several minutes. Please wait. ++ coradb server stop: success @ coradb server stop: testdb Server testdb notified of shutdown. This may take several minutes. Please wait. ++ coradb server stop: success @ coradb broker stop ++ coradb broker stop: success @ coradb master stop ++ coradb master stop: success @ coradb master start ++ coradb master start: success @ coradb server start: demodb This may take a long time depending on the amount of recovery works to do. CoraDB 1.0 ++ coradb server start: success @ coradb server start: testdb This may take a long time depending on the amount of recovery works to do. CoraDB 1.0 ++ coradb server start: success @ coradb broker start ++ coradb broker start: success Managing Service Status ----------------------- The following example shows how to check the status of master process and database server registered. :: % coradb service status @ coradb master status ++ coradb master is running. @ coradb server status Server testdb (rel 11.0, pid 31059) Server demodb (rel 11.0, pid 30950) @ coradb broker status % query_editor ---------------------------------------- ID PID QPS LQS PSIZE STATUS ---------------------------------------- 1 15465 0 0 48032 IDLE 2 15466 0 0 48036 IDLE 3 15467 0 0 48036 IDLE 4 15468 0 0 48036 IDLE 5 15469 0 0 48032 IDLE % broker1 OFF @ coradb manager server status ++ coradb manager server is not running. The following message is returned if master process has stopped. :: % coradb service status @ coradb master status ++ coradb master is not running. .. _coradb-utility-logging: coradb Utility Logging ---------------------- CoraDB supports a logging feature about coradb utility's running result. **Logging contents** The following contents are written to the **$CoraDB/log/coradb_utility.log** file. * All commands through coradb utilities: only usage, version and parsing errors are not logged. * Execution results by coradb utilities: success/failure. * An error message when failure. **Log file size** A size of **coradb_utility.log** file is expanded by the size specified by **error_log_size** parameter in **coradb.conf**; if this size is enlarged as the specified size, it is backed up as the **coradb_utility.log.bak** file. **Log format** ::