stop_db
Stops a database or sandbox.
Stops a database or sandbox.
Syntax
vcluster stop_db options
Required options
{ -c | --config }string- The path to the configuration file. If a configuration file is present in the default location (automatically generated by
create_db), you do not need to specify this option.Default:
/opt/vertica/config/vertica_cluster.yaml
Options
--ca-cert-filestring- The path to the trusted CA certificate file.
Default:
/opt/vertica/config/https_certs/rootca.pem
--cert-filestring- The absolute path to the certificate file. If you specify this option, you must also specify
--key-file. You should only use--cert-fileand--key-fileif you have configured the Node Management Agent (NMA) to use custom certificates.
{ -d | --db-name }string- The name of the database. You should only use this option if you want to override the database name in your configuration file. This string must conform to the format used for database names.
--drain-secondsint- [Eon only] The time to wait, in seconds, for user connections to close on their own. When the time expires, user connections are automatically closed and the database is shut down. If set to
0, VCluster closes all user connections immediately. If the value is negative, VCluster waits indefinitely until all user connections close.Default:
60
--eon-mode- [Eon only] Indicates that the database is an Eon Mode database.
--force-kill- Closes all active sessions before stopping the database.
{ -h | --help }- Prints help text.
--hostsstrings- A comma-separated list of hosts in the database.
--if-no-users- Shuts down the database only if no users are currently connected. If any users are connected, the command exits with an error.
--ipv6- Specifies if the hosts use IPv6 addresses.
Default:
IPv4
--key-filestring- Path to the key file. If you specify this option, you must also specify
--cert-file. You should only use--cert-fileand--key-fileif you have configured the Node Management Agent (NMA) to use custom certificates.
{ -l | --log-path }string- The absolute path for debug logs.
Default:
/opt/vertica/log/vcluster.log
--main-cluster-only- Stops the database without stopping any sandboxed subclusters.
{ -p | --password }string- The database password.
--password-filestring- The absolute path to a file containing the database password.
If you pass a dash(-) (that is, `--password-file -`), the password is read from STDIN.
Important
Your database password cannot include single quotes.
--read-password-from-prompt- Prompts the user to enter the password.
--sandboxstring- Name of the sandbox to stop.
--sync-catalog- Specifies whether to sync the catalog before stopping the database.
--tls-modestring- Sets the TLS validation mode. Valid options are
enable,verify-ca,verify-full.Default:
enable
--use-password-for-sql-client-only- Use the password for the NMA SQL client only.
--verbose- Shows the details of VCluster run in the console.
Examples
To stop a database with default drain timeout (60 seconds):
vcluster stop_db
To stop a database with config file using password authentication with user-specified drain seconds:
vcluster stop_db --password "PASSWORD" \
--config /opt/vertica/config/vertica_cluster.yaml --drain-seconds 10
To stop a database if no users are connected:
vcluster stop_db --if-no-users
To close all active sessions before stopping the database:
vcluster stop_db --force-kill
To stop a database with config file using password authentication and close all active sessions before stopping the database:
vcluster stop_db --password "PASSWORD" \
--config /opt/vertica/config/vertica_cluster.yaml
--force-kill