Visit Counter

Monday, January 26, 2015

How to drop a database from SQL*PLUS



We need to remove database created only fr test purpose using RMAN duplicate command.



SQL> shutdown immediate;
ORA-01109: database not open


Database dismounted.

ORACLE instance shut down.
SQL>
SQL>


SQL> startup mount exclusive restrict;
ORACLE instance started.

Total System Global Area 7348420608 bytes
Fixed Size                  2150272 bytes
Variable Size            1201614976 bytes
Database Buffers         6006243328 bytes
Redo Buffers              138412032 bytes
Database mounted.


SQL>
SQL> drop database;

Database dropped.

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>


Drop database command remove data files and control files from OS level.