Stop a Database

This article explains how to stop a database.

Prerequisites

There are no prerequisites for this procedure.

Procedure

This procedure uses the c4 and confd_client command-line tools in a Linux terminal. For more information about these tools, see Exasol Deployment Tool (c4) and ConfD.

  1. Connect to the cluster operating system (COS) using c4 connect -i PLAY_ID -s cos.

    Example:
    Copy
    ./c4 connect -i c3275f84 -s cos

    For more information about how to use c4 connect, see How to use c4.

  2. To find the database name when you are connected to COS, use the ConfD job db_list.

    Example:
    Copy
    confd_client db_list
    - MY_DATABASE
  3. To stop the database, use the ConfD job db_stop with the following parameters:

    Parameter name Data type Description
    db_name string The name of the database.
    cluster string

    The database cluster(s) that should be stopped. If the parameter is omitted, all clusters are stopped.

    Accepted values are:

    • <clustername> Stops the database on a specific worker cluster.
    • MAIN or +all Stops the main database and all worker databases. The database name can be passed instead of MAIN. This is the same as omitting the parameter.
    Examples:

    To stop the database on a specific worker cluster:

    Copy
    confd_client db_stop db_name: MY_DATABASE cluster: WORKER1

    To stop the database on all clusters:

    Copy
    confd_client db_stop db_name: MY_DATABASE
    # or
    confd_client db_stop db_name: MY_DATABASE cluster: MY_DATABASE
    # or
    confd_client db_stop db_name: MY_DATABASE cluster: MAIN
    # or 
    confd_client db_stop db_name: MY_DATABASE cluster: +all

Verification

To verify that the database has stopped, use the ConfD job db_state. If the result is setup, the database is stopped.

Example:
Copy
confd_client db_state db_name: MY_DATABASE
...
Result:
'setup'