Skip Headers
Oracle® Database Backup and Recovery Reference
11g Release 1 (11.1)

Part Number B28273-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

DROP DATABASE

Purpose

Use the 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.

Prerequisites

Execute this command only at the RMAN prompt. You must be connected to the target database. The target database must be mounted exclusive and not open, and started in RESTRICT mode.

Syntax

dropDatabase::=

Description of dropdatabase.gif follows
Description of the illustration dropdatabase.gif

Semantics

Syntax Element Description
INCLUDING BACKUPS 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 NOCATALOG mode when you drop the database, then RMAN will not delete any backups which are known to the recovery catalog but no longer exist in the target database control file.

NOPROMPT Does not prompt for confirmation before deleting the database.

Example

Example 2-69 Deleting a Database

In this example, you want to delete a test database called test1 that is registered in the recovery catalog. You connect RMAN to the target and catalog databases, mount the database, and enable a restricted session. You then delete the database files, as well as all backups, copies, and archived logs associated with the database:

CONNECT TARGET SYS/password@test1
CONNECT CATALOG test1/password@catdb
STARTUP FORCE MOUNT
SQL 'ALTER SYSTEM ENABLE RESTRICTED SESSION';
DROP DATABASE INCLUDING BACKUPS NOPROMPT;