Pages

Monday, July 4, 2011

Drop Database

To Drop a database we can directly use oracle command "Drop database". And this makes it easy enough clearing all the data and control files.

To drop the database we need to start the database in mount restricted mode.

The sequence of commands is as follows:-

SQL> shutdown abort;
ORACLE instance shut down.
SQL> startup mount restrict;
ORACLE instance started.

Total System Global Area  313860096 bytes
Fixed Size                  1336232 bytes
Variable Size             201329752 bytes
Database Buffers          104857600 bytes
Redo Buffers                6336512 bytes
Database mounted.
SQL> drop database;

Database dropped.

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select name, open_mode from v$database;
SP2-0640: Not connected

The parameter file and archive logs will be present at their location and the log, data and control files will be deleted.

No comments:

Post a Comment