|Oracle® Database Backup and Recovery Reference
11g Release 1 (11.1)
|PDF · Mobi · ePub|
DROP DATABASE command to delete the target database and, if RMAN is connected to a recovery catalog, unregister it. RMAN removes all datafiles, online redo logs, and control files belonging to the target database. By default, RMAN prompts for confirmation.
Execute this command only at the RMAN prompt. You must be connected to a target database. The target database must be mounted exclusive and not open, and started in
||Deletes backup sets, proxy copies, image copies, and archived redo logs associated with the target database from all configured device types.
Note: If you have been using a recovery catalog but run RMAN in
||Does not prompt for confirmation before deleting the database.|
In this example, you want to delete a test database called
test1 that is registered in the recovery catalog. You start the RMAN client, connect to database
TARGET, and connect to the recovery catalog. You then run the following commands to delete the target database files, as well as all backups, copies, and archived logs associated with the database:
RMAN> CONNECT TARGET SYS@test1 target database Password: password connected to target database: TEST1 (DBID=39525561) RMAN> STARTUP FORCE MOUNT RMAN> SQL 'ALTER SYSTEM ENABLE RESTRICTED SESSION'; RMAN> DROP DATABASE INCLUDING BACKUPS NOPROMPT;