Deleting Database

Description

The cubrid deletedb utility is used to delete a database. You must use the cubrid deletedb utility to delete a database, instead of using the file deletion commands of the operating system; a database consists of a few interdependent files. The cubrid deletedb utility also deletes the information on the database from the database location file (databases.txt). The cubrid deletedb utility must be run offline, that is, in standalone mode when nobody is using the database.

Syntax

cubrid deletedb options database_name

options : [{-o|--output-file=} file]  [-d|--delete-backup]

Options

Storing output messages (-o or --output-file)

The following example shows how to delete testdb and write messages to the file specified by using the -o option.

cubrid deletedb -o deleted_db.out testdb

The cubrid deletedb utility also deletes the database information contained in the database location file (databases.txt). The following message is returned if you enter a utility that tries to delete a non-existing database.

cubrid deletedb testdb

Database "testdb" is unknown, or the file "databases.txt" cannot be accessed.

Deleting backup files simultaneously (-d or --delete-backup)

The following example shows how to delete testdb and its backup volumes and backup information files simultaneously by using the -d option. If the -d option is not specified, backup volume and backup information files are not deleted.

cubrid deletedb -d testdb