Tuesday, February 3, 2009

Drop a database from rman utility

are you sure you want to drop your database . Be careful........................

Let us check a way to drop database from rman prompt. although we can drop database from sql prompt as
sql> drop database;

but we will do the same being in rman prompt.
step 1:
(start the database in mount exclusive mode and exit)

sql> startup mount exclusive
ORACLE instance started.

Total System Global Area 209715200 bytes
Fixed Size 1248164 bytes
Variable Size 142607452 bytes
Database Buffers 62914560 bytes
Redo Buffers 2945024 bytes
Database mounted.


step 2:
(connect to rman and issue the following)

RMAN> drop database;

database name is "LION" and DBID is 396604920
Do you really want to drop the database (enter YES or NO)?

so, if you really want to drop the database type yes and enter.
you can easily overstep the confirmation prompt by adding "noprompt" in the above mention command.

drop database command will delete all the datafiles,control files and redo files. if you want to delete all the corresponding backups also just issue the following command.

RMAN> drop database including backups ;


have a nice day......

The more a man knows, the more he forgives.
Catherine the Great

No comments: