Share the content if you found it is useful (You can share using 300 community websites) click "share" at the end of the post.

You are encouraged to leave a comment.








Thursday, February 12, 2009

Dropping a database using RMAN (Target Database) (Uses version 10g)

In 10G, it is possible to drop the target database using RMAN command "DROP DATABASE".

Its complete syntax is as follows:

DROP DATABASE;
DROP DATABASE NOPROMPT;
DROP DATABASE INCLUDING BACKUPS;
DATABASE INCLUDING BACKUPS NOPROMPT;

Note: When "NOPROMPT" is specified RMAN does not prompt you for confirmation before deleting the database.

By default, RMAN prompts for confirmation.

Usage of "DROP DATABASE" command:

Without recovery catalog:


1) RMAN> DROP DATABASE;

Deletes the target database.
Following database files are removed at Operating system level:
Datafiles
Logfiles
Controlfiles
Spfile

2) RMAN> DROP DATABASE INCLUDING BACKUPS;

In addition to (1), the above command also removes the following files:
Archivelogs
Backup pieces generated by RMAN for the target database

With recovery catalog:

When you executed the "DROP DATABASE" command with RMAN connected to
recovery catalog, RMAN also unregisters the target database.

Restrictions and Usage

Execute this command only at the RMAN prompt.

* You must be connected to the target database, which must mounted exclusive and not open.*

If you want RMAN to delete archived logs, copies, and backups belonging
to the database, then you must use the DROP DATABASE INCLUDING BACKUPS
syntax of the command.

* This command doesn't remove following files:
init.ora
password file

* If the operating system is Windows NT/2000, then it does not delete the windows NT service for the target database instance.

No comments:

Related Posts Plugin for WordPress, Blogger...

Let us be Friends...

Share |

Popular Posts

Recent Comments