Stop a Database

Stopping a database stops the main cluster and all worker clusters. Additionally, you can specify to shut down all database nodes after the database is shut down to save costs.

Prerequisites

The database must be running in order to shut it down. For more information, see Start a Database.

Procedure

This procedure can be carried out using the Administration API.

The examples in this procedure are written using Bash on a Linux terminal. You can also use other interfaces and languages to execute the curl commands.

Placeholder values are styled as Bash variables, starting with the dollar sign ($) and using UPPERCASE characters. Replace the placeholders with your own values before executing the curl command.

  1. Get information about the database by sending a GET request to the /api/v1/databases endpoint. For example:

    curl -k -X "GET" \
    "https://$EXASOL_IP/api/v1/databases" \
    -H "accept: application/json" \
    -H "Authorization: Basic $AUTH_TOKEN"

    The response will include the following:

    • Database ID
    • Database name
    • Database version
    • Provider type
    • Number of clusters in the database
    • Number of clusters running
    • Volumes

    Additional database parameters and hardware details may be included in the response depending on the configuration and platform.

  2. To stop the database, send a PUT request to the /ap1/v1/databases/DATABASE_ID/stop endpoint. For example:

    curl -k -X "PUT" \
    "https://$EXASOL_IP/api/v1/databases/$DATABASE_ID/stop" \
    -H "accept: application/json" \
    -H "Authorization: Basic $AUTH_TOKEN"

    If you want to also stop the database nodes after stopping the database, add ?stopInstances=true after the endpoint. For example:

    curl -k -X "PUT" \
    "https://$EXASOL_IP/api/v1/databases/$DATABASE_ID/stop?stopInstances=true" \
    -H "accept: application/json" \
    -H "Authorization: Basic $AUTH_TOKEN"

Verification

To verify that the database has stopped, send a GET request to the /api/v1/databases endpoint like in step 1. The output looks similar to the following:

[{"id":"Exasol","name":"Exasol","provider":"aws","clusters":{"total":1,"running":0}}]

If the value for "running" is 0, then the database has stopped.