Oracle® Database Backup and Recovery Reference 10g Release 2 (10.2) Part Number B14194-03 |
|
|
View PDF |
Syntax
dropDatabase::=
Purpose
Deletes the target database and, if RMAN is connected to a recovery catalog, unregisters it. RMAN removes all datafiles, online logs, and control files belonging to the target database.
Restrictions and Usage Notes
Execute this command only at the RMAN prompt.
You must be connected to the target database, which must mounted exclusive and not open, and started in RESTRICT
mode.
If you want RMAN to delete archived logs, copies, and backups belonging to the database, then you must use the DROP DATABASE INCLUDING BACKUPS
form of the command.
Keywords and Parameters
Syntax Element | Description |
---|---|
INCLUDING BACKUPS |
Deletes backup sets, proxy copies, image copies, and archived logs associated with the target database from all configured device types.
Note: If you have been using a recovery catalog but run RMAN in |
NOPROMPT |
Specifies that you do not want RMAN to prompt you for confirmation before deleting the database. By default, RMAN prompts for confirmation. |
Example
Deleting a Database: Example In this example, you want to delete a test database called test1
that is registered in the recovery catalog. You connect to test1
which is started in RESTRICT
mode, and delete the database files, as well as all backups, copies, and archived logs associated with the database:
% sqlplus SYS/oracle@test1 AS SYSDBA; SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION; SQL> QUIT; % rman TARGET SYS/oracle@test1 CATALOG test1/test1@catdb RMAN> DROP DATABASE INCLUDING BACKUPS NOPROMPT;