Drop a database with RMAN
Drop an Oracle database from the RMAN prompt, with or without its backups, and the related warnings.
Dropping a database deletes its datafiles, control files and online redo logs. It cannot be undone. Check the target database and the DBID before you run the command, and verify that the backups you need exist.
RMAN can drop a database as well as SQL*Plus. The steps below use RMAN.
1. Start the database in mount exclusive mode
sql> startup mount exclusive
sql> exit;
2. Drop the database with RMAN
RMAN> drop database;
RMAN shows the database name and DBID, then asks for confirmation:
database name is "ORCL" and DBID is 1234567890
Do you really want to drop the database (enter YES or NO)?
Enter YES to confirm.
To skip the confirmation prompt, add noprompt:
RMAN> drop database noprompt;
drop database deletes the datafiles, the control files and the redo log files. To also delete the backups, use:
RMAN> drop database including backups;