Having identified the name of a database to be deleted, it is necessary to first stop (shut down) the database. To delete a specific database:
1. Run the
show domain command to confirm the names of all databases in your domain.
nuocmd show domain server version: 4.1.1, server license: Enterprise server time: 2020-09-18T19:09:17.123, client token: 07e10b90d4d5c47719116366d4a86ff95767867e Servers: [nuoadmin-0] host1:48005 (LEADER, Leader=nuoadmin-0) ACTIVE:Connected * [nuoadmin-1] host2:48005 (FOLLOWER, Leader=nuoadmin-0) ACTIVE:Connected Databases: hockey [RUNNING] [SM] host1:48006 (Default) [start_id = 0] [server_id = nuoadmin-0] [pid = 144] [node_id = 1] MONITORED:RUNNING [TE] host2:48006 (Default) [start_id = 1] [server_id = nuoadmin-1] [pid = 103] [node_id = 2] MONITORED:RUNNING
2. Shut down the database you want to delete.
nuocmd shutdown database --db-name <database name>
3. Delete the database.
nuocmd delete database --db-name <database name>
|Deleting a database is a non-recoverable action and should be executed with great caution. Deleting a database removes all metadata from the durable domain configuration but does not delete the database’s archive. In other words, it does not delete the data that the database contains. The archive directory can be removed from disk manually.|