Drop database command
The database drop
command removes an existing VCDB instance.
|
Options
The database drop
command inherits global options from the main vcdb
command and
script options from its parent database
command. Additionally, it provides
options for dropping an existing VCDB instance.
Global options
Option | Description | Default value |
---|---|---|
|
One or more argument files containing options. |
|
|
Show a help message and exit. |
|
|
Print version information and exit. |
|
|
Load configuration from this file. |
|
|
Log level: |
|
|
Write log messages to this file. |
|
|
Disable console log messages. |
|
|
Create a file containing the process ID. |
|
|
Load plugins from this directory. |
|
|
Enable or disable plugins with a matching fully qualified class name. |
|
For more details on the global options and usage hints, see here.
Script options
Option | Description | Default value |
---|---|---|
|
Path to the database client executable. |
Client found in your |
|
Time in seconds to wait for the operation to complete. |
60 |
For more details on the script options and usage hints, see here.
Database connection options
Option | Description | Default value |
---|---|---|
|
Name of the host on which the VCDB is running. |
|
|
Port of the VCDB server. |
5432 |
|
Name of the VCDB database to connect to. |
|
|
Username to use when connecting to the VCDB. |
|
|
Password to use when connecting to the VCDB. Leave empty to be prompted. |
|
|
Database-specific connection properties. |
For more details on the database connection options and usage hints, see here.
Unlike other commands, the --db-schema option is not available for database drop .
|
Usage
Dropping a VCDB instance
Dropping a VCDB instance requires running the drop
command with the connection details of the target VCDB
instance. As described here, the connection details can be supplied using the CLI options
listed above, or via alternative methods such as a JSON configuration file or environment variables.
The following options are mandatory:
-
--db-name
: The target database that contains the VCDB instance to drop. -
--db-username
: The owner of the VCDB instance or a user with sufficient privileges to perform the drop.
The example below illustrates how to drop a VCDB instance.
-
Linux
-
Windows CMD
./vcdb database drop \
-H localhost \
-d citydb \
-u citydb_user \
-p mySecret
vcdb database drop ^
-H localhost ^
-d citydb ^
-u citydb_user ^
-p mySecret
When the drop
command is executed, log messages are printed to the console showing the progress of the operation.
The command indicates whether the VCDB instance was successfully dropped or if an error occurred. On error, the log
shows the corresponding message to help identify the cause.
When setting the --log-level to debug , the log also includes the output of the database client executing
the SQL scripts.
|