Command Reference Guide > Command Reference Guide > Using Ingres Commands > destroydb Command--Destroy a Database
Was this helpful?
destroydb Command--Destroy a Database
Permission required: DBA or system administrator.
The destroydb command removes an existing database. The directory of the database and all files in that directory are removed. You cannot destroy the iidbdb using destroydb.
If you are using Ingres Star, the destroydb command destroys the distributed database, the coordinator database, and all the Ingres Star objects that make up the distributed database. Data in underlying tables in non-coordinator local databases registered in the distributed database are not affected.
The destroydb command has the following format:
destroydb dbname [-p] [-l] [-uusername] [-Ppassword]
dbname
Specifies the name of the database.
-p
Prompts you to be sure that you want to destroy the database.
VMS: If you want to be prompted for confirmation automatically when you execute the destroydb command, use the following command, which eliminates the need to use the –p flag to obtain a confirmation prompt:
destroydb:=="ii_system:[ingres.bin] destroydb.exe -p"
-l
Confirms if the database is in use, and if in use, returns with an error message.
-uusername
Specifies the effective user for the session, as described in Standard Flags and Parameters on page 16.
-Ppassword
Specifies the user password for the database.
Last modified date: 11/28/2023