Search This Blog

Tuesday, September 6, 2011

Manual Delete/Drop Database in 11gr2 via command line

There is two option to delete/drop database in oracle via DBCA or COMMAND line.

How to drop database via command line
1.  connect with sysdba user 
SQL> startup mount
ORACLE instance started.

Total System Global Area  150667264 bytes
Fixed Size                  1382112 bytes
Variable Size              92277024 bytes
Database Buffers           50331648 bytes
Redo Buffers                6676480 bytes
Database mounted.
SQL> alter system enable restricted session;

System altered.

SQL> drop database;

Database dropped.

Disconnected from Oracle Database 11g Enterprise Edition Release - Pr
With the Partitioning, OLAP, Data Mining and Real Application Testing options

Important Point:
1. Database must be closed
2. database must be in restricted mode
3. drop database command will delete ORADATA FILES (control/redo/datafile and SPFILE)
4. archivelog and rman backup can be deleted via rman command
5. drop database will not delete any files on raw disk. we need to delete manually
6. registry entry need to delete manually

write me email in case of any queries at askdbataj

1 comment:

Anonymous said...

Your blog help me alot.